blob: c0e061b6f4dc1f34c3b62ceaae385f1b93ef5da1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
get_dev_pagemap() is only used with CONFIG_ZONE_DEVICE and
USE=kernel-open, and in kernel 6.18 takes one argument in less that
NVIDIA seemingly did not need.
This is a simplified version of 590.44.01's fix which skips the
conftest.sh changes for easier backporting (at worst the simple version
check may break if the kernel backports this to older kernels).
[1] https://github.com/NVIDIA/open-gpu-kernel-modules/pull/951
--- a/kernel-module-source/kernel-open/nvidia-uvm/uvm_va_range_device_p2p.c
+++ b/kernel-module-source/kernel-open/nvidia-uvm/uvm_va_range_device_p2p.c
@@ -361,5 +361,9 @@
if (gpu->parent->cdmm_enabled) {
get_page(page);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,18,0)
+ get_dev_pagemap(page_to_pfn(page));
+#else
get_dev_pagemap(page_to_pfn(page), NULL);
+#endif
}
#else
|