summarylogtreecommitdiffstats
path: root/4.12.0_kernel.patch
blob: 095a1fc2a8bab7f5af01323cc201a5856e4b8944 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
diff -Naur NVIDIA-Linux-x86_64-340.102-old/kernel/conftest.sh NVIDIA-Linux-x86_64-340.102-new/kernel/conftest.sh
--- NVIDIA-Linux-x86_64-340.102-old/kernel/conftest.sh	2017-01-16 21:15:32.000000000 +0100
+++ NVIDIA-Linux-x86_64-340.102-new/kernel/conftest.sh	2017-07-05 20:58:45.283333334 +0200
@@ -362,7 +362,11 @@
             # Determine if the set_memory_uc() function is present.
             #
             CODE="
-            #include <asm/cacheflush.h>
+            #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+                #include <asm/set_memory.h>
+            #else
+                #include <asm/cacheflush.h>
+            #endif
             void conftest_set_memory_uc(void) {
                 set_memory_uc();
             }"
@@ -375,7 +379,11 @@
             # Determine if the set_memory_array_uc() function is present.
             #
             CODE="
-            #include <asm/cacheflush.h>
+            #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+                #include <asm/set_memory.h>
+            #else
+                #include <asm/cacheflush.h>
+            #endif
             void conftest_set_memory_array_uc(void) {
                 set_memory_array_uc();
             }"
@@ -388,7 +396,11 @@
             # Determine if the set_pages_uc() function is present.
             #
             CODE="
-            #include <asm/cacheflush.h>
+            #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+                #include <asm/set_memory.h>
+            #else
+                #include <asm/cacheflush.h>
+            #endif
             void conftest_set_pages_uc(void) {
                 set_pages_uc();
             }"
diff -Naur NVIDIA-Linux-x86_64-340.102-old/kernel/nv-vm.c NVIDIA-Linux-x86_64-340.102-new/kernel/nv-vm.c
--- NVIDIA-Linux-x86_64-340.102-old/kernel/nv-vm.c	2017-01-16 21:15:32.000000000 +0100
+++ NVIDIA-Linux-x86_64-340.102-new/kernel/nv-vm.c	2017-07-05 20:58:45.286666667 +0200
@@ -13,6 +13,10 @@
 #include "nv.h"
 #include "nv-linux.h"
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+    #include <asm/set_memory.h>
+#endif
+
 static inline void nv_set_contig_memory_uc(nv_pte_t *page_ptr, NvU32 num_pages)
 {
     if (nv_update_memory_types)
diff -Naur NVIDIA-Linux-x86_64-340.102-old/kernel/uvm/conftest.sh NVIDIA-Linux-x86_64-340.102-new/kernel/uvm/conftest.sh
--- NVIDIA-Linux-x86_64-340.102-old/kernel/uvm/conftest.sh	2017-01-16 21:15:33.000000000 +0100
+++ NVIDIA-Linux-x86_64-340.102-new/kernel/uvm/conftest.sh	2017-07-05 20:58:45.286666667 +0200
@@ -362,7 +362,11 @@
             # Determine if the set_memory_uc() function is present.
             #
             CODE="
-            #include <asm/cacheflush.h>
+            #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+                #include <asm/set_memory.h>
+            #else
+                #include <asm/cacheflush.h>
+            #endif
             void conftest_set_memory_uc(void) {
                 set_memory_uc();
             }"
@@ -375,7 +379,11 @@
             # Determine if the set_memory_array_uc() function is present.
             #
             CODE="
-            #include <asm/cacheflush.h>
+            #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+                #include <asm/set_memory.h>
+            #else
+                #include <asm/cacheflush.h>
+            #endif
             void conftest_set_memory_array_uc(void) {
                 set_memory_array_uc();
             }"
@@ -388,7 +396,11 @@
             # Determine if the set_pages_uc() function is present.
             #
             CODE="
-            #include <asm/cacheflush.h>
+            #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+                #include <asm/set_memory.h>
+            #else
+                #include <asm/cacheflush.h>
+            #endif
             void conftest_set_pages_uc(void) {
                 set_pages_uc();
             }"