commit bdf4c71805616749f36c521ae24e8ead3c2d8c0b
Author: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
Date: Mon Aug 19 15:59:53 2024 +0200
Add patch for kernel >= 6.10 - RFBZ#7022
Signed-off-by: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
...9-kernel-6.10-removed-follow_pfn-function.patch | 65 ++++++++++++++++++++++
nvidia-390xx-kmod.spec | 4 ++
2 files changed, 69 insertions(+)
---
diff --git a/nvidia-390xx-kmod-0089-kernel-6.10-removed-follow_pfn-function.patch
b/nvidia-390xx-kmod-0089-kernel-6.10-removed-follow_pfn-function.patch
new file mode 100644
index 0000000..2229970
--- /dev/null
+++ b/nvidia-390xx-kmod-0089-kernel-6.10-removed-follow_pfn-function.patch
@@ -0,0 +1,65 @@
+From de3bf7828321bf3a36a61d53ab658511a7e68fcb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nicolas=20Vi=C3=A9ville?= <nicolas.vieville(a)uphf.fr>
+Date: Mon, 19 Aug 2024 13:55:15 +0200
+Subject: [PATCH] Linux 6.10: follow_pfn function removed, then undef
+ NV_FOLLOW_PFN_PRESENT
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
+---
+ kernel/conftest.sh | 18 +++++++++++++-----
+ kernel/nvidia/os-mlock.c | 4 +++-
+ 2 files changed, 16 insertions(+), 6 deletions(-)
+
+diff --git a/kernel/conftest.sh b/kernel/conftest.sh
+index e20ed5f..72cf3ec 100755
+--- a/kernel/conftest.sh
++++ b/kernel/conftest.sh
+@@ -660,13 +660,21 @@ compile_test() {
+ # Determine if the follow_pfn() function is
+ # present.
+ #
+- CODE="
++ # follow_pfn() was added by commit 3b6748e2dd69
++ # ("mm: introduce follow_pfn()") in v2.6.31-rc1, and removed
++ # by commit 233eb0bf3b94 ("mm: remove follow_pfn")
++ # from linux-next 233eb0bf3b94.
++ #
++ # Undefined for rpmfusion for fc40
++ #
++ #CODE="
+ #include <linux/mm.h>
+- void conftest_follow_pfn(void) {
+- follow_pfn();
+- }"
++ #void conftest_follow_pfn(void) {
++ # follow_pfn();
++ #}"
+
+- compile_check_conftest "$CODE" "NV_FOLLOW_PFN_PRESENT"
"" "functions"
++ #compile_check_conftest "$CODE" "NV_FOLLOW_PFN_PRESENT"
"" "functions"
++ echo "#undef NV_FOLLOW_PFN_PRESENT" | append_conftest
"functions"
+ ;;
+
+ i2c_adapter)
+diff --git a/kernel/nvidia/os-mlock.c b/kernel/nvidia/os-mlock.c
+index ad5cb9a..a59cb9f 100644
+--- a/kernel/nvidia/os-mlock.c
++++ b/kernel/nvidia/os-mlock.c
+@@ -20,8 +20,10 @@ static inline int nv_follow_pfn(struct vm_area_struct *vma,
+ {
+ #if defined(NV_UNSAFE_FOLLOW_PFN_PRESENT)
+ return unsafe_follow_pfn(vma, address, pfn);
+-#else
++##elif defined(NV_FOLLOW_PFN_PRESENT)
+ return follow_pfn(vma, address, pfn);
++#else
++ return -1;
+ #endif
+ }
+
+--
+2.46.0
+
diff --git a/nvidia-390xx-kmod.spec b/nvidia-390xx-kmod.spec
index 82c1ea7..c93e737 100644
--- a/nvidia-390xx-kmod.spec
+++ b/nvidia-390xx-kmod.spec
@@ -102,6 +102,7 @@ Patch151:
nvidia-390xx-kmod-0085-undef-NV_DRM_GEM_OBJECT_PUT_UNLOCK_PRESENT-in-c
Patch152:
nvidia-390xx-kmod-0086-undef-NV_DRM_CONNECTOR_FUNCS_HAVE_MODE_IN_NAME-in-conftest_sh.patch
Patch153:
nvidia-390xx-kmod-0087-undef-NV_DRM_REINIT_PRIMARY_MODE_GROUP_PRESENT-in-conftest_sh.patch
Patch154:
nvidia-390xx-kmod-0088-undef-NV_DRM_ATOMIC_HELPER_CONNECTOR_DPMS_PRESENT-in-conftest_sh.patch
+Patch155: nvidia-390xx-kmod-0089-kernel-6.10-removed-follow_pfn-function.patch
# build system updates
Patch30: use-kbuild-compiler.patch
@@ -218,6 +219,9 @@ tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{versi
%patch -P 31 -p1 -b 31 -d kernel
%patch -P 32 -p1 -b 32 -d kernel
%patch -P 33 -p1 -b 33 -d kernel
+
+%patch -P 155 -p1 -b 155
+
%ifarch armv7hl
%patch -P 40 -p1 -b 40 -d kernel
%patch -P 41 -p1 -b 41 -d kernel
Show replies by date