54 lines
1.7 KiB
Diff
54 lines
1.7 KiB
Diff
--- kernel/conftest.sh.orig
|
|
+++ kernel/conftest.sh
|
|
@@ -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();
|
|
}"
|
|
--- kernel/nv-vm.c.orig
|
|
+++ kernel/nv-vm.c
|
|
@@ -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)
|