core/nvidia-340xx/4.12.0_kernel.patch

99 lines
3.8 KiB
Diff

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();
}"