1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
From 5a0afb2493ee7dd2a36c2f577542b6564c728d70 Mon Sep 17 00:00:00 2001
From: Yong Zhao <Yong.Zhao@amd.com>
Date: Fri, 3 Mar 2017 14:50:59 -0500
Subject: [PATCH 1605/4131] Hybrid-kfd-adaption: Disable cross_memory_copy
feature
The feature relies on mm_access() to be exported by kernel code, but
all the current upstream kernels have not make it exported. We have
to disable the feautre for hybrid driver compatibility.
Change-Id: I8a316414114252d8250c47b73f047e43db46eef2
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
index 52d120c..bad4783 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
@@ -1876,6 +1876,13 @@ static int kfd_ioctl_get_tile_config(struct file *filep,
return 0;
}
+#if defined(BUILD_AS_DKMS)
+static int kfd_ioctl_cross_memory_copy(struct file *filep,
+ struct kfd_process *local_p, void *data)
+{
+ return 0;
+}
+#else
static int kfd_ioctl_cross_memory_copy(struct file *filep,
struct kfd_process *local_p, void *data)
{
@@ -2116,6 +2123,7 @@ static int kfd_ioctl_cross_memory_copy(struct file *filep,
args->bytes_copied = total_copied;
return err;
}
+#endif
#define AMDKFD_IOCTL_DEF(ioctl, _func, _flags) \
[_IOC_NR(ioctl)] = {.cmd = ioctl, .func = _func, .flags = _flags, .cmd_drv = 0, .name = #ioctl}
--
2.7.4
|