112 lines
2.9 KiB
Diff
112 lines
2.9 KiB
Diff
From fbc0d704f47526ca38f518b60237962cc6b08305 Mon Sep 17 00:00:00 2001
|
|
From: David McFarland <corngood@gmail.com>
|
|
Date: Thu, 25 Aug 2016 23:08:02 -0300
|
|
Subject: [PATCH] remove dependency on System.map
|
|
|
|
---
|
|
amd/backport/Makefile | 3 +--
|
|
amd/backport/kcl_fence.c | 10 ++++++++--
|
|
amd/backport/symbols | 3 ---
|
|
dkms.conf | 1 -
|
|
pre-build.sh | 32 --------------------------------
|
|
5 files changed, 9 insertions(+), 40 deletions(-)
|
|
delete mode 100644 amd/backport/symbols
|
|
delete mode 100755 pre-build.sh
|
|
|
|
diff --git a/amd/backport/Makefile b/amd/backport/Makefile
|
|
index 6447a15..4682e0f 100644
|
|
--- a/amd/backport/Makefile
|
|
+++ b/amd/backport/Makefile
|
|
@@ -53,10 +53,9 @@ ccflags-y += -DOS_NAME_RHEL_7
|
|
endif
|
|
endif
|
|
|
|
-BACKPORT_OBJS = symbols.o
|
|
endif
|
|
|
|
-BACKPORT_OBJS += kcl_drm.o kcl_ttm.o kcl_amdgpu.o kcl_fence.o kcl_mn.o
|
|
+BACKPORT_OBJS = kcl_drm.o kcl_ttm.o kcl_amdgpu.o kcl_fence.o kcl_mn.o
|
|
|
|
amdgpu-y += $(addprefix ../backport/,$(BACKPORT_OBJS))
|
|
|
|
diff --git a/amd/backport/kcl_fence.c b/amd/backport/kcl_fence.c
|
|
index 2141eef..ceef1fe 100644
|
|
--- a/amd/backport/kcl_fence.c
|
|
+++ b/amd/backport/kcl_fence.c
|
|
@@ -22,8 +22,14 @@ struct default_wait_cb {
|
|
struct task_struct *task;
|
|
};
|
|
|
|
-extern void
|
|
-(*fence_default_wait_cb)(struct fence *fence, struct fence_cb *cb);
|
|
+static void
|
|
+fence_default_wait_cb(struct fence *fence, struct fence_cb *cb)
|
|
+{
|
|
+ struct default_wait_cb *wait =
|
|
+ container_of(cb, struct default_wait_cb, base);
|
|
+
|
|
+ wake_up_process(wait->task);
|
|
+}
|
|
|
|
signed long
|
|
_kcl_fence_wait_any_timeout(struct fence **fences, uint32_t count,
|
|
diff --git a/amd/backport/symbols b/amd/backport/symbols
|
|
deleted file mode 100644
|
|
index 2d3f2ee..0000000
|
|
--- a/amd/backport/symbols
|
|
+++ /dev/null
|
|
@@ -1,3 +0,0 @@
|
|
-SYMS=""
|
|
-
|
|
-SYMS+="fence_default_wait_cb"
|
|
diff --git a/dkms.conf b/dkms.conf
|
|
index 9ca148e..36be480 100644
|
|
--- a/dkms.conf
|
|
+++ b/dkms.conf
|
|
@@ -4,4 +4,3 @@ BUILT_MODULE_NAME[0]="amdgpu"
|
|
BUILT_MODULE_LOCATION[0]="amd/amdgpu"
|
|
DEST_MODULE_LOCATION[0]="/extra"
|
|
AUTOINSTALL="yes"
|
|
-PRE_BUILD="pre-build.sh $kernelver"
|
|
\ No newline at end of file
|
|
diff --git a/pre-build.sh b/pre-build.sh
|
|
deleted file mode 100755
|
|
index 88ec680..0000000
|
|
--- a/pre-build.sh
|
|
+++ /dev/null
|
|
@@ -1,32 +0,0 @@
|
|
-#!/bin/bash
|
|
-
|
|
-KERNELVER=$1
|
|
-KERNELVER_BASE=${KERNELVER%%-*}
|
|
-
|
|
-version_lt () {
|
|
- newest=$((echo "$1"; echo "$2") | sort -V | tail -n1)
|
|
- [ "$1" != "$newest" ]
|
|
-}
|
|
-
|
|
-version_ge () {
|
|
- newest=$((echo "$1"; echo "$2") | sort -V | tail -n1)
|
|
- [ "$1" = "$newest" ]
|
|
-}
|
|
-
|
|
-version_gt () {
|
|
- oldest=$((echo "$1"; echo "$2") | sort -V | head -n1)
|
|
- [ "$1" != "$oldest" ]
|
|
-}
|
|
-
|
|
-version_le () {
|
|
- oldest=$((echo "$1"; echo "$2") | sort -V | head -n1)
|
|
- [ "$1" = "$oldest" ]
|
|
-}
|
|
-
|
|
-source amd/backport/symbols
|
|
-
|
|
-echo '// auto generated by DKMS pre-build.sh' > amd/backport/symbols.c
|
|
-for sym in $SYMS; do
|
|
- addr=$(grep $sym /boot/System.map-$KERNELVER | awk -F' ' '{print $1}')
|
|
- echo "void *$sym = (void *)0x$addr;" >> amd/backport/symbols.c
|
|
-done
|
|
--
|
|
2.9.3
|
|
|