-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnvidia-kernel-6.13.patch
51 lines (46 loc) · 2.29 KB
/
nvidia-kernel-6.13.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
diff -up NVIDIA-Linux-x86_64-560.35.03/kernel-open/nvidia/internal_crypt_lib.h.omv~ NVIDIA-Linux-x86_64-560.35.03/kernel-open/nvidia/internal_crypt_lib.h
--- NVIDIA-Linux-x86_64-560.35.03/kernel-open/nvidia/internal_crypt_lib.h.omv~ 2024-12-03 17:03:29.670620008 +0100
+++ NVIDIA-Linux-x86_64-560.35.03/kernel-open/nvidia/internal_crypt_lib.h 2024-12-03 17:04:31.401380067 +0100
@@ -36,6 +36,7 @@
#include <linux/limits.h>
#include <linux/random.h>
#include <linux/string.h>
+#include <linux/version.h>
// Check if ECDH/ECDSA are there, on some platforms they might not be...
#ifndef AUTOCONF_INCLUDED
@@ -64,7 +65,7 @@
* old or even just user disabled. If we should use LKCA, include headers, else
* define stubs to return errors.
*/
-#if defined(NV_CRYPTO_PRESENT) && defined (NV_CONFIG_CRYPTO_PRESENT)
+#if defined(NV_CRYPTO_PRESENT) && defined (NV_CONFIG_CRYPTO_PRESENT) && LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0) /* 6.13 drops crypto_akcipher_verify */
#define USE_LKCA 1
#endif
diff -up NVIDIA-Linux-x86_64-565.77/kernel-open/nvidia/nv.c.omv~ NVIDIA-Linux-x86_64-565.77/kernel-open/nvidia/nv.c
--- NVIDIA-Linux-x86_64-565.77/kernel-open/nvidia/nv.c.omv~ 2024-12-24 04:54:27.460258101 +0100
+++ NVIDIA-Linux-x86_64-565.77/kernel-open/nvidia/nv.c 2024-12-24 04:54:43.680389194 +0100
@@ -127,7 +127,10 @@ MODULE_ALIAS_CHARDEV_MAJOR(NV_MAJOR_DEVI
* DMA_BUF namespace is added by commit id 16b0314aa746
* ("dma-buf: move dma-buf symbols into the DMA_BUF module namespace") in 5.16
*/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0)
-MODULE_IMPORT_NS(DMA_BUF);
+#else
+MODULE_IMPORT_NS("DMA_BUF");
+#endif
#endif // defined(MODULE_IMPORT_NS)
const NvBool nv_is_rm_firmware_supported_os = NV_TRUE;
diff -up NVIDIA-Linux-x86_64-565.77/kernel-open/nvidia/nv-dmabuf.c.omv~ NVIDIA-Linux-x86_64-565.77/kernel-open/nvidia/nv-dmabuf.c
--- NVIDIA-Linux-x86_64-565.77/kernel-open/nvidia/nv-dmabuf.c.omv~ 2024-12-24 15:58:52.309422060 +0100
+++ NVIDIA-Linux-x86_64-565.77/kernel-open/nvidia/nv-dmabuf.c 2024-12-24 15:59:04.829688547 +0100
@@ -23,6 +23,12 @@
#include <linux/dma-buf.h>
#include "nv-dmabuf.h"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0)
+MODULE_IMPORT_NS(DMA_BUF);
+#else
+MODULE_IMPORT_NS("DMA_BUF");
+#endif
+
#if defined(CONFIG_DMA_SHARED_BUFFER)
typedef struct nv_dma_buf_mem_handle