mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-12-20 18:34:35 +00:00
When marking as 6.18 compatible, I missed this USE=kernel-open build failure given it only happens when CONFIG_ZONE_DEVICE is enabled and the kernel I tested did not (option requires memory hotplugging and hotremove support to be enabled, not enabled by defconfig). Normally we do not backport kernel fixes, but in this case the only fixed version is currently the 590.x (unkeyworded) beta and given 6.18 is due to become LTS I'd rather get this fixed now (possible that new 0/vulkan releases will not include the fix too). Only 580.x is affected given older branches did not use this function. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
21 lines
853 B
Diff
21 lines
853 B
Diff
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
|