[packages/xorg-driver-video-nvidia] split kernel 4.7 compatibility patch into non-uvm and uvm parts

atler atler at pld-linux.org
Tue Aug 2 22:46:51 CEST 2016


commit da1282cb32613dd4d7edfc34b71b98b380f63471
Author: Jan Palus <atler at pld-linux.org>
Date:   Tue Aug 2 22:40:48 2016 +0200

    split kernel 4.7 compatibility patch into non-uvm and uvm parts
    
    uvm is only present on 64bit

 linux-4.7-uvm.patch           | 15 +++++++++++++++
 linux-4.7.patch               | 15 ---------------
 xorg-driver-video-nvidia.spec |  4 ++++
 3 files changed, 19 insertions(+), 15 deletions(-)
---
diff --git a/xorg-driver-video-nvidia.spec b/xorg-driver-video-nvidia.spec
index f6f6de2..3a1e8e0 100644
--- a/xorg-driver-video-nvidia.spec
+++ b/xorg-driver-video-nvidia.spec
@@ -48,6 +48,7 @@ Source5:	10-nvidia-modules.conf
 Patch0:		X11-driver-nvidia-GL.patch
 Patch1:		X11-driver-nvidia-desktop.patch
 Patch2:		linux-4.7.patch
+Patch3:		linux-4.7-uvm.patch
 URL:		http://www.nvidia.com/object/unix.html
 BuildRequires:	rpmbuild(macros) >= 1.701
 %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
@@ -253,6 +254,9 @@ rm -rf NVIDIA-Linux-x86*-%{version}*
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%ifarch %{x8664}
+%patch3 -p1
+%endif
 echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
 
 %build
diff --git a/linux-4.7-uvm.patch b/linux-4.7-uvm.patch
new file mode 100644
index 0000000..786db7f
--- /dev/null
+++ b/linux-4.7-uvm.patch
@@ -0,0 +1,15 @@
+--- a/kernel/nvidia-uvm/uvm_linux.h
++++ b/kernel/nvidia-uvm/uvm_linux.h
+@@ -547,7 +547,11 @@
+     INIT_RADIX_TREE(tree, GFP_NOWAIT);
+ }
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++static bool radix_tree_is_empty(struct radix_tree_root *tree)
++#else
+ static bool radix_tree_empty(struct radix_tree_root *tree)
++#endif
+ {
+     void *dummy;
+     return radix_tree_gang_lookup(tree, &dummy, 0, 1) == 0;
+
diff --git a/linux-4.7.patch b/linux-4.7.patch
index 0dc12c8..97a0b48 100644
--- a/linux-4.7.patch
+++ b/linux-4.7.patch
@@ -43,18 +43,3 @@
      if (gem == NULL)
      {
 
---- a/kernel/nvidia-uvm/uvm_linux.h
-+++ b/kernel/nvidia-uvm/uvm_linux.h
-@@ -547,7 +547,11 @@
-     INIT_RADIX_TREE(tree, GFP_NOWAIT);
- }
- 
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
-+static bool radix_tree_is_empty(struct radix_tree_root *tree)
-+#else
- static bool radix_tree_empty(struct radix_tree_root *tree)
-+#endif
- {
-     void *dummy;
-     return radix_tree_gang_lookup(tree, &dummy, 0, 1) == 0;
-
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-nvidia.git/commitdiff/da1282cb32613dd4d7edfc34b71b98b380f63471



More information about the pld-cvs-commit mailing list