diff options
author | vnctdj | 2022-12-16 23:53:02 +0100 |
---|---|---|
committer | vnctdj | 2022-12-17 00:10:08 +0100 |
commit | b77821651021050a31e274e3b735cb5ce035f150 (patch) | |
tree | 080ebd3bdf087aa0f831d46e47f92413b694f1ca /kernel-4.16+-memory-encryption.patch | |
parent | c0170d8adba1382b3f4b469940fd7eb06fd84f09 (diff) | |
download | aur-b77821651021050a31e274e3b735cb5ce035f150.tar.gz |
Rename kernel 4.16 patch to better understand its purpose
This patch is for systems with encrypted memory support enabled, more info by loqs here:
https://bbs.archlinux.org/viewtopic.php?pid=2073931#p2073931
Diffstat (limited to 'kernel-4.16+-memory-encryption.patch')
-rw-r--r-- | kernel-4.16+-memory-encryption.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/kernel-4.16+-memory-encryption.patch b/kernel-4.16+-memory-encryption.patch new file mode 100644 index 000000000000..737295cdc5fa --- /dev/null +++ b/kernel-4.16+-memory-encryption.patch @@ -0,0 +1,33 @@ +diff --git a/kernel/common/inc/nv-linux.h b/kernel/common/inc/nv-linux.h +index 10fc418..22ef968 100644 +--- a/kernel/common/inc/nv-linux.h ++++ b/kernel/common/inc/nv-linux.h +@@ -174,7 +174,11 @@ static inline uid_t __kuid_val(kuid_t uid) + + #if defined(NV_VM_INSERT_PAGE_PRESENT) + #include <linux/pagemap.h> ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0) + #include <linux/dma-mapping.h> ++#else ++#include <linux/dma-direct.h> ++#endif + + #if defined(NV_LINUX_DMA_MAP_OPS_H_PRESENT) + #include <linux/dma-map-ops.h> +diff --git a/kernel/conftest.sh b/kernel/conftest.sh +index b23dbb4..42dc576 100755 +--- a/kernel/conftest.sh ++++ b/kernel/conftest.sh +@@ -2056,7 +2056,12 @@ compile_test() { + # Determine if the phys_to_dma function is present. + # + CODE=" ++ #include <linux/version.h> ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0) + #include <linux/dma-mapping.h> ++#else ++ #include <linux/dma-direct.h> ++#endif + void conftest_phys_to_dma(void) { + phys_to_dma(); + }" |