From e2aa8b2960a591cfe8ddc4608f42921a11ea2acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Tue, 2 Jan 2018 03:19:08 +0100 Subject: [PATCH] nvidia: fix patch (different basedir for x86{,_64}) --- .../nvidia-x86-uvm8_va_block-linux_4_14_9.patch | 17 +++++++++++++++++ ...dia-x86_64-uvm8_va_block-linux_4_14_9.patch} | 0 srcpkgs/nvidia/template | 9 +++++++++ 3 files changed, 26 insertions(+) create mode 100644 srcpkgs/nvidia/files/nvidia-x86-uvm8_va_block-linux_4_14_9.patch rename srcpkgs/nvidia/{patches/nvidia-uvm8_va_block-linux_4_14_9.patch => files/nvidia-x86_64-uvm8_va_block-linux_4_14_9.patch} (100%) diff --git a/srcpkgs/nvidia/files/nvidia-x86-uvm8_va_block-linux_4_14_9.patch b/srcpkgs/nvidia/files/nvidia-x86-uvm8_va_block-linux_4_14_9.patch new file mode 100644 index 00000000000..cc9c29e0cfc --- /dev/null +++ b/srcpkgs/nvidia/files/nvidia-x86-uvm8_va_block-linux_4_14_9.patch @@ -0,0 +1,17 @@ +Since linux-4.14.9 there has been some kernel headers reordering. +Fix that issue by including linux/sched/task_stack.h for kernels +newer than 4.14.9. + +--- NVIDIA-Linux-x86-384.98/kernel/nvidia-uvm/uvm8_va_block.c 2017-10-27 01:19:54.000000000 +0200 ++++ NVIDIA-Linux-x86-384.98/kernel/nvidia-uvm/uvm8_va_block.c 2018-01-02 02:50:05.260588964 +0100 +@@ -36,6 +36,10 @@ + #include "uvm8_perf_prefetch.h" + #include "uvm8_mem.h" + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,9) ++#include ++#endif ++ + typedef enum + { + BLOCK_PTE_OP_MAP, diff --git a/srcpkgs/nvidia/patches/nvidia-uvm8_va_block-linux_4_14_9.patch b/srcpkgs/nvidia/files/nvidia-x86_64-uvm8_va_block-linux_4_14_9.patch similarity index 100% rename from srcpkgs/nvidia/patches/nvidia-uvm8_va_block-linux_4_14_9.patch rename to srcpkgs/nvidia/files/nvidia-x86_64-uvm8_va_block-linux_4_14_9.patch diff --git a/srcpkgs/nvidia/template b/srcpkgs/nvidia/template index 854bad7bb0d..db381ab966f 100644 --- a/srcpkgs/nvidia/template +++ b/srcpkgs/nvidia/template @@ -38,6 +38,15 @@ do_extract() { cd ${wrksrc} ./${_pkg}.run --extract-only rm -f ${_pkg}.run + # + if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then + cp ${FILESDIR}/nvidia-x86-uvm8_va_block-linux_4_14_9.patch \ + nvidia-uvm8_va_block-linux_4_14_9.patch + else + cp ${FILESDIR}/nvidia-x86_64-uvm8_va_block-linux_4_14_9.patch \ + nvidia-uvm8_va_block-linux_4_14_9.patch + fi + patch -p0 < nvidia-uvm8_va_block-linux_4_14_9.patch } pre_install() {