30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
|
--- NVIDIA-Linux-x86_64-390.138-no-compat32/kernel/common/inc/nv-linux.h 2020-05-14 14:29:21.000000000 +0200
|
||
|
+++ NVIDIA-Linux-x86_64-390.138-no-compat32/kernel/common/inc/nv-linux.h 2020-09-10 21:56:45.927763032 +0200
|
||
|
@@ -531,7 +531,11 @@
|
||
|
|
||
|
static inline void *nv_vmalloc(unsigned long size)
|
||
|
{
|
||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)
|
||
|
void *ptr = __vmalloc(size, GFP_KERNEL, PAGE_KERNEL);
|
||
|
+#else
|
||
|
+ void *ptr = __vmalloc(size, GFP_KERNEL);
|
||
|
+#endif
|
||
|
if (ptr)
|
||
|
NV_MEMDBG_ADD(ptr, size);
|
||
|
return ptr;
|
||
|
--- NVIDIA-Linux-x86_64-390.138-no-compat32/kernel/common/inc/nv-mm.h 2020-05-14 14:29:21.000000000 +0200
|
||
|
+++ NVIDIA-Linux-x86_64-390.138-no-compat32/kernel/common/inc/nv-mm.h 2020-09-10 22:25:40.666693863 +0200
|
||
|
@@ -29,6 +29,12 @@
|
||
|
typedef int vm_fault_t;
|
||
|
#endif
|
||
|
|
||
|
+#include <linux/version.h>
|
||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)
|
||
|
+/* kernel 5.8.0-rc1 renamed mmap_sem to mmap_lock */
|
||
|
+#define mmap_sem mmap_lock
|
||
|
+#endif
|
||
|
+
|
||
|
/* get_user_pages
|
||
|
*
|
||
|
* The 8-argument version of get_user_pages was deprecated by commit
|