diff options
Diffstat (limited to 'linux-4.12.patch')
-rw-r--r-- | linux-4.12.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/linux-4.12.patch b/linux-4.12.patch new file mode 100644 index 000000000000..796c5ff95f78 --- /dev/null +++ b/linux-4.12.patch @@ -0,0 +1,43 @@ +diff -Naur nv.orig/conftest.sh nv/conftest.sh +--- nv.orig/conftest.sh 2017-10-16 16:21:22.549358000 +0200 ++++ nv/conftest.sh 2017-10-16 16:32:49.985089045 +0200 +@@ -237,7 +237,11 @@ + # Determine if the set_pages_uc() function is present. + # + echo "$CONFTEST_PREAMBLE +- #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(); + }" > conftest$$.c +@@ -267,8 +271,10 @@ + #include <linux/version.h> + #include <linux/utsname.h> + #include <linux/mm.h> +- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) +- #include <asm/cacheflush.h> ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++ #include <asm/set_memory.h> ++ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) ++ #include <asm/cacheflush.h> + #endif + void conftest_change_page_attr(void) { + change_page_attr(); +diff -Naur nv.orig/nv-vm.c nv/nv-vm.c +--- nv.orig/nv-vm.c 2013-11-27 23:47:09.000000000 +0100 ++++ nv/nv-vm.c 2017-10-16 16:35:11.059602958 +0200 +@@ -14,6 +14,10 @@ + #include "nv-linux.h" + #include "nv-vm.h" + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) ++ #include <asm/set_memory.h> ++#endif ++ + #if defined(NV_DBG_MEM) + #define NV_DEFAULT_LIST_PAGE_COUNT 10 + |