commit 9aa193014dc6a964230c00113d31d1c1fcfaed41
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Sat Jun 1 12:31:58 2024 +0100
Patch for kernel-6.10rc
kernel-610.patch | 31 +++++++++++++++++++++++++++++++
nvidia-open-kmod.spec | 14 ++++++++++----
2 files changed, 41 insertions(+), 4 deletions(-)
---
diff --git a/kernel-610.patch b/kernel-610.patch
new file mode 100644
index 0000000..7869f37
--- /dev/null
+++ b/kernel-610.patch
@@ -0,0 +1,31 @@
+diff --git a/kernel-open/nvidia/os-mlock.c b/kernel-open/nvidia/os-mlock.c
+index 46f99a1..b8f4100 100644
+--- a/kernel-open/nvidia/os-mlock.c
++++ b/kernel-open/nvidia/os-mlock.c
+@@ -36,11 +36,21 @@ static inline int nv_follow_pfn(struct vm_area_struct *vma,
+ unsigned long address,
+ unsigned long *pfn)
+ {
+-#if defined(NV_UNSAFE_FOLLOW_PFN_PRESENT)
+- return unsafe_follow_pfn(vma, address, pfn);
+-#else
+- return follow_pfn(vma, address, pfn);
+-#endif
++ int status = 0;
++ spinlock_t *ptl;
++ pte_t *ptep;
++
++ if (!(vma->vm_flags & (VM_IO | VM_PFNMAP)))
++ return status;
++
++ status = follow_pte(vma, address, &ptep, &ptl);
++ if (status)
++ return status;
++ *pfn = pte_pfn(ptep_get(ptep));
++
++ // The lock is acquired inside follow_pte()
++ pte_unmap_unlock(ptep, ptl);
++ return 0;
+ }
+
+ /*!
diff --git a/nvidia-open-kmod.spec b/nvidia-open-kmod.spec
index dd4d53e..b10bc0c 100644
--- a/nvidia-open-kmod.spec
+++ b/nvidia-open-kmod.spec
@@ -12,7 +12,7 @@ Name: nvidia-open-kmod
Epoch: 3
Version: 555.42.02
# Taken over by kmodtool
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: NVIDIA open display driver kernel module
License: GPLv2 and MIT
URL:
https://github.com/NVIDIA/open-gpu-kernel-modules
@@ -20,6 +20,7 @@ URL:
https://github.com/NVIDIA/open-gpu-kernel-modules
Source0: %{url}/archive/%{version}/open-gpu-kernel-modules-%{version}.tar.gz
Source11: nvidia-open-kmodtool-excludekernel-filterfile
Patch0: make_modeset_default.patch
+Patch1: kernel-610.patch
ExclusiveArch: x86_64 aarch64
@@ -40,12 +41,14 @@ The nvidia open %{version} display driver kernel module for kernel
%{kversion}.
# print kmodtool output for debugging purposes:
kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} --filterfile
%{SOURCE11} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels
"%{?kernels}"} 2>/dev/null
%setup -q -c
-ls
# patch loop
+%if 0%{?_with_nvidia_defaults:1}
+echo "Using original nvidia defaults"
+%else
+echo "Set nvidia to fbdev=1 modeset=1"
%patch 0 -p1 -d open-gpu-kernel-modules-%{version}
-%if 0%{?_without_nvidia_kmod_patches:1}
-# placeholder
%endif
+%patch 1 -p1 -d open-gpu-kernel-modules-%{version}
for kernel_version in %{?kernel_versions} ; do
cp -a open-gpu-kernel-modules-%{version} _kmod_build_${kernel_version%%___*}
@@ -80,6 +83,9 @@ done
%changelog
+* Sat Jun 01 2024 Leigh Scott <leigh123linux(a)gmail.com> - 3:555.42.02-2
+- Patch for kernel-6.10rc
+
* Tue May 21 2024 Leigh Scott <leigh123linux(a)gmail.com> - 3:555.42.02-1
- Update to 555.42.02 beta