[packages/xorg-driver-video-nvidia-legacy-390xx] split uvm part of kernel 6.3 fix into separate patch
atler
atler at pld-linux.org
Sat May 27 21:54:49 CEST 2023
commit 85d476e6b3a4a1cb63ff838bd1f1aee13af8dbde
Author: Jan Palus <jpalus at fastmail.com>
Date: Sat May 27 21:53:57 2023 +0200
split uvm part of kernel 6.3 fix into separate patch
uvm available only for 64-bit
kernel-6.3-uvm.patch | 12 ++++++++++++
kernel-6.3.patch | 12 ------------
xorg-driver-video-nvidia-legacy-390xx.spec | 4 ++++
3 files changed, 16 insertions(+), 12 deletions(-)
---
diff --git a/xorg-driver-video-nvidia-legacy-390xx.spec b/xorg-driver-video-nvidia-legacy-390xx.spec
index 9f9d08e..94b9b82 100644
--- a/xorg-driver-video-nvidia-legacy-390xx.spec
+++ b/xorg-driver-video-nvidia-legacy-390xx.spec
@@ -53,6 +53,7 @@ Patch0: X11-driver-nvidia-GL.patch
Patch1: X11-driver-nvidia-desktop.patch
Patch2: kenrel-6.2.patch
Patch3: kernel-6.3.patch
+Patch4: kernel-6.3-uvm.patch
URL: https://www.nvidia.com/en-us/drivers/unix/
BuildRequires: rpm-build >= 4.6
BuildRequires: rpmbuild(macros) >= 1.752
@@ -315,6 +316,9 @@ rm -rf NVIDIA-Linux-x86*-%{version}*
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%ifarch %{x8664}
+%patch4 -p1
+%endif
echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
%build
diff --git a/kernel-6.3-uvm.patch b/kernel-6.3-uvm.patch
new file mode 100644
index 0000000..7156c9a
--- /dev/null
+++ b/kernel-6.3-uvm.patch
@@ -0,0 +1,12 @@
+diff --color -ur NVIDIA-Linux-x86_64-390.157-no-compat32.orig/kernel/nvidia-uvm/uvm8.c NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/nvidia-uvm/uvm8.c
+--- NVIDIA-Linux-x86_64-390.157-no-compat32.orig/kernel/nvidia-uvm/uvm8.c 2022-10-12 11:30:28.000000000 +0200
++++ NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/nvidia-uvm/uvm8.c 2023-05-27 21:31:28.027398157 +0200
+@@ -658,7 +658,7 @@
+ // Using VM_DONTCOPY would be nice, but madvise(MADV_DOFORK) can reset that
+ // so we have to handle vm_open on fork anyway. We could disable MADV_DOFORK
+ // with VM_IO, but that causes other mapping issues.
+- vma->vm_flags |= VM_MIXEDMAP | VM_DONTEXPAND;
++ nv_vm_flags_set(vma, VM_MIXEDMAP | VM_DONTEXPAND | VM_DONTCOPY);
+
+ vma->vm_ops = &uvm_vm_ops_managed;
+
diff --git a/kernel-6.3.patch b/kernel-6.3.patch
index bf67b5e..2a6892b 100644
--- a/kernel-6.3.patch
+++ b/kernel-6.3.patch
@@ -116,15 +116,3 @@ diff --color -ur NVIDIA-Linux-x86_64-390.157-no-compat32.orig/kernel/nvidia-drm/
#include <drm/drm_crtc_helper.h>
-diff --color -ur NVIDIA-Linux-x86_64-390.157-no-compat32.orig/kernel/nvidia-uvm/uvm8.c NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/nvidia-uvm/uvm8.c
---- NVIDIA-Linux-x86_64-390.157-no-compat32.orig/kernel/nvidia-uvm/uvm8.c 2022-10-12 11:30:28.000000000 +0200
-+++ NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/nvidia-uvm/uvm8.c 2023-05-27 21:31:28.027398157 +0200
-@@ -658,7 +658,7 @@
- // Using VM_DONTCOPY would be nice, but madvise(MADV_DOFORK) can reset that
- // so we have to handle vm_open on fork anyway. We could disable MADV_DOFORK
- // with VM_IO, but that causes other mapping issues.
-- vma->vm_flags |= VM_MIXEDMAP | VM_DONTEXPAND;
-+ nv_vm_flags_set(vma, VM_MIXEDMAP | VM_DONTEXPAND | VM_DONTCOPY);
-
- vma->vm_ops = &uvm_vm_ops_managed;
-
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-nvidia-legacy-390xx.git/commitdiff/85d476e6b3a4a1cb63ff838bd1f1aee13af8dbde
More information about the pld-cvs-commit
mailing list