[nvidia-kmod] fix build

Leigh Scott leigh123linux at rpmfusion.org
Fri Jul 8 16:31:11 CEST 2016


commit 7fff178403247b792eb5a99c853054f2862206c5
Author: leigh123linux <leigh123linux at googlemail.com>
Date:   Fri Jul 8 15:30:42 2016 +0100

    fix build

 nvidia-4.7_kernel-pt1.patch                            | 15 +++++++++++++++
 nvidia-4.7_kernel.patch => nvidia-4.7_kernel_pt2.patch | 15 ---------------
 nvidia-kmod.spec                                       |  6 +++++-
 3 files changed, 20 insertions(+), 16 deletions(-)
---
diff --git a/nvidia-4.7_kernel-pt1.patch b/nvidia-4.7_kernel-pt1.patch
new file mode 100644
index 0000000..ca4618d
--- /dev/null
+++ b/nvidia-4.7_kernel-pt1.patch
@@ -0,0 +1,15 @@
+--- a/kernel/nvidia-uvm/uvm_linux.h
++++ b/kernel/nvidia-uvm/uvm_linux.h
+@@ -563,7 +563,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/nvidia-4.7_kernel.patch b/nvidia-4.7_kernel_pt2.patch
similarity index 72%
rename from nvidia-4.7_kernel.patch
rename to nvidia-4.7_kernel_pt2.patch
index 11a53da..833519e 100644
--- a/nvidia-4.7_kernel.patch
+++ b/nvidia-4.7_kernel_pt2.patch
@@ -1,18 +1,3 @@
---- a/kernel/nvidia-uvm/uvm_linux.h
-+++ b/kernel/nvidia-uvm/uvm_linux.h
-@@ -563,7 +563,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;
-
 --- a/kernel/nvidia-drm/nvidia-drm-fb.c
 +++ b/kernel/nvidia-drm/nvidia-drm-fb.c
 @@ -24,6 +24,7 @@
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index aef293b..fb3e343 100644
--- a/nvidia-kmod.spec
+++ b/nvidia-kmod.spec
@@ -19,7 +19,8 @@ URL:           http://www.nvidia.com/
 Source11:      nvidia-kmodtool-excludekernel-filterfile
 Patch0:        nv-linux-arm.patch
 Patch1:        nv-linux-arm2.patch
-Patch2:        nvidia-4.7_kernel.patch
+Patch2:        nvidia-4.7_kernel-pt1.patch
+Patch3:        nvidia-4.7_kernel_pt2.patch
 
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -47,7 +48,10 @@ tar --use-compress-program xz -xf %{_datadir}/%{name}-%{version}/%{name}-%{versi
 # patch loop
 %patch0 -p1
 %patch1 -p1
+%ifarch x86_64
 %patch2 -p1
+%endif
+%patch3 -p1
 
 
 for kernel_version  in %{?kernel_versions} ; do


More information about the rpmfusion-commits mailing list