]> git.pld-linux.org Git - packages/xorg-driver-video-nvidia-legacy-390xx.git/commitdiff
split uvm part of kernel 6.3 fix into separate patch auto/th/xorg-driver-video-nvidia-legacy-390xx-390.157-3
authorJan Palus <jpalus@fastmail.com>
Sat, 27 May 2023 19:53:57 +0000 (21:53 +0200)
committerJan Palus <jpalus@fastmail.com>
Sat, 27 May 2023 19:53:57 +0000 (21:53 +0200)
uvm available only for 64-bit

kernel-6.3-uvm.patch [new file with mode: 0644]
kernel-6.3.patch
xorg-driver-video-nvidia-legacy-390xx.spec

diff --git a/kernel-6.3-uvm.patch b/kernel-6.3-uvm.patch
new file mode 100644 (file)
index 0000000..7156c9a
--- /dev/null
@@ -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;
index bf67b5e398dd6cee1579a5fa19cf07e6ce5d93cd..2a6892bb004401e118dc412d411805975b22eedd 100644 (file)
@@ -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;
index 9f9d08ebb5f06cfd83340095fadb021846a38781..94b9b82c45819e47c77d8c5216cbd7d5acbe832e 100644 (file)
@@ -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
This page took 0.101042 seconds and 4 git commands to generate.