mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 14:41:17 +00:00
113 lines
3 KiB
Diff
113 lines
3 KiB
Diff
From e03fd9f392af963a534dd3c40df06e81976766e6 Mon Sep 17 00:00:00 2001
|
|
From: David McFarland <corngood@gmail.com>
|
|
Date: Wed, 26 Oct 2016 22:26:39 -0300
|
|
Subject: [PATCH 2/2] 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 dcc94d5..ef27e94 100644
|
|
--- a/amd/backport/Makefile
|
|
+++ b/amd/backport/Makefile
|
|
@@ -55,10 +55,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 f553501..e50ec3d 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]="/kernel/drivers/gpu/drm/amd/amdgpu"
|
|
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 6f45523..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.10.0
|
|
|