nvidia340: add patch for linux5.3 compatibility
This commit is contained in:
parent
e79af8c355
commit
66e831301f
|
@ -0,0 +1,49 @@
|
|||
diff --git kernel/nv-linux.h kernel/nv-linux.h
|
||||
index 4043bf1..62f0874 100644
|
||||
--- kernel/nv-linux.h
|
||||
+++ 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)
|
||||
|
|
@ -4,7 +4,7 @@ _desc="NVIDIA drivers (GeForce 8, 9, 9M, 100, 100M, 200, 300 series)"
|
|||
|
||||
pkgname=nvidia340
|
||||
version=340.107
|
||||
revision=4
|
||||
revision=5
|
||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
license="Proprietary NVIDIA license"
|
||||
homepage="http://www.nvidia.com"
|
||||
|
@ -43,6 +43,7 @@ do_patch() {
|
|||
patch -p0 < ${FILESDIR}/kernel-4.11.patch
|
||||
patch -p0 < ${FILESDIR}/kernel-5.0.patch
|
||||
patch -p0 < ${FILESDIR}/kernel-5.1.patch
|
||||
patch -p0 < ${FILESDIR}/kernel-5.3.patch
|
||||
}
|
||||
|
||||
do_install() {
|
||||
|
|
Loading…
Reference in New Issue