summarylogtreecommitdiffstats
path: root/4.12.0_kernel.patch
diff options
context:
space:
mode:
Diffstat (limited to '4.12.0_kernel.patch')
-rw-r--r--4.12.0_kernel.patch98
1 files changed, 98 insertions, 0 deletions
diff --git a/4.12.0_kernel.patch b/4.12.0_kernel.patch
new file mode 100644
index 000000000000..095a1fc2a8ba
--- /dev/null
+++ b/4.12.0_kernel.patch
@@ -0,0 +1,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();
+ }"