]> git.pld-linux.org Git - packages/xorg-driver-video-nvidia-legacy-340xx.git/commitdiff
- fix building with kernel 5.3 auto/th/xorg-driver-video-nvidia-legacy-340xx-340.107-4
authorJan Rękorajski <baggins@pld-linux.org>
Wed, 18 Sep 2019 17:12:32 +0000 (19:12 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Wed, 18 Sep 2019 17:12:32 +0000 (19:12 +0200)
kernel-5.3.patch [new file with mode: 0644]
xorg-driver-video-nvidia-legacy-340xx.spec

diff --git a/kernel-5.3.patch b/kernel-5.3.patch
new file mode 100644 (file)
index 0000000..8c6f50e
--- /dev/null
@@ -0,0 +1,62 @@
+From df6b6227e19b46cf23abca790570804872cbf87c Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Tue, 13 Aug 2019 11:20:39 +0200
+Subject: [PATCH 1/1] Add support for Linux 5.3
+
+smp_call_function() and on_each_cpu() no longer have return values
+as per commit caa759323c73676b3e48c8d9c86093c88b4aba97
+---
+ nv-linux.h | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/nv-linux.h b/nv-linux.h
+index 4043bf1..62f0874 100644
+--- NVIDIA-Linux-x86_64-340.107-no-compat32/kernel/nv-linux.h
++++ NVIDIA-Linux-x86_64-340.107-no-compat32/kernel/nv-linux.h
+@@ -877,12 +877,21 @@ extern void *nv_stack_t_cache;
+         __ret;                                               \
+      })
+ #elif (NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT == 3)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 0)
+ #define NV_SMP_CALL_FUNCTION(func, info, wait)               \
+     ({                                                       \
+         int __ret = smp_call_function(func, info, wait);     \
+         __ret;                                               \
+      })
+ #else
++#define NV_SMP_CALL_FUNCTION(func, info, wait)               \
++    ({                                                       \
++        int __ret = 0;                                       \
++        smp_call_function(func, info, wait);                 \
++        __ret;                                               \
++     })
++#endif
++#else
+ #error "NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT value unrecognized!"
+ #endif
+ #elif defined(CONFIG_SMP)
+@@ -897,12 +906,21 @@ extern void *nv_stack_t_cache;
+         __ret;                                         \
+      })
+ #elif (NV_ON_EACH_CPU_ARGUMENT_COUNT == 3)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 0)
+ #define NV_ON_EACH_CPU(func, info, wait)               \
+     ({                                                 \
+         int __ret = on_each_cpu(func, info, wait);     \
+         __ret;                                         \
+      })
+ #else
++#define NV_ON_EACH_CPU(func, info, wait)               \
++    ({                                                 \
++        int __ret = 0;                                 \
++        on_each_cpu(func, info, wait);                 \
++        __ret;                                         \
++    })
++#endif
++#else
+ #error "NV_ON_EACH_CPU_ARGUMENT_COUNT value unrecognized!"
+ #endif
+ #elif defined(CONFIG_SMP)
+-- 
+2.20.1
+
index ee4f537f5aa6ff12ceb9362e270e347c7b3ce26e..91fe92b5ad94a9862bec6b39109b176768f30a2f 100644 (file)
@@ -25,7 +25,7 @@ exit 1
 
 %define                no_install_post_check_so 1
 
-%define                rel     3
+%define                rel     4
 %define                pname   xorg-driver-video-nvidia-legacy-340xx
 Summary:       Linux Drivers for nVidia GeForce/Quadro Chips
 Summary(hu.UTF-8):     Linux meghajtók nVidia GeForce/Quadro chipekhez
@@ -50,6 +50,7 @@ Patch1:               X11-driver-nvidia-desktop.patch
 Patch2:                linux-4.0.patch
 Patch3:                kernel-4.4.169.patch
 Patch4:                kernel-5.0.patch
+Patch5:                kernel-5.3.patch
 URL:           http://www.nvidia.com/object/unix.html
 BuildRequires: rpmbuild(macros) >= 1.701
 %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
@@ -254,6 +255,7 @@ rm -rf NVIDIA-Linux-x86*-%{version}*
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
 
 %build
This page took 0.082857 seconds and 4 git commands to generate.