commit a36344c9e8a0b4dec0392a21d30c4c27fd390106
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Sat Sep 23 10:14:48 2017 +0100
uvm is x86_64 only
... => 4.13_hack_license_as_kernel_devs_hate_us-part1.patch | 13 -------------
4.13_hack_license_as_kernel_devs_hate_us-part2.patch | 13 +++++++++++++
nvidia-kmod.spec | 6 +++++-
3 files changed, 18 insertions(+), 14 deletions(-)
---
diff --git a/4.13_hack_license_as_kernel_devs_hate_us.patch
b/4.13_hack_license_as_kernel_devs_hate_us-part1.patch
similarity index 81%
rename from 4.13_hack_license_as_kernel_devs_hate_us.patch
rename to 4.13_hack_license_as_kernel_devs_hate_us-part1.patch
index eddcb4c..84c149b 100644
--- a/4.13_hack_license_as_kernel_devs_hate_us.patch
+++ b/4.13_hack_license_as_kernel_devs_hate_us-part1.patch
@@ -78,16 +78,3 @@ diff -uNrp a/kernel/nvidia-modeset/nvidia-modeset-linux.c
b/kernel/nvidia-modese
#if defined(MODULE_INFO)
MODULE_INFO(supported, "external");
#endif
-diff -uNrp a/kernel/nvidia-uvm/uvm_common.c b/kernel/nvidia-uvm/uvm_common.c
---- a/kernel/nvidia-uvm/uvm_common.c 2017-09-20 02:33:10.000000000 +0100
-+++ b/kernel/nvidia-uvm/uvm_common.c 2017-09-23 09:02:44.989610766 +0100
-@@ -388,5 +388,9 @@ module_param(uvm_enable_builtin_tests, i
- MODULE_PARM_DESC(uvm_enable_builtin_tests,
- "Enable the UVM built-in tests. (This is a security risk)");
-
-+#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
-+MODULE_LICENSE("Dual MIT/GPL");
-+#else
- MODULE_LICENSE("MIT");
-+#endif
- MODULE_INFO(supported, "external");
diff --git a/4.13_hack_license_as_kernel_devs_hate_us-part2.patch
b/4.13_hack_license_as_kernel_devs_hate_us-part2.patch
new file mode 100644
index 0000000..2b6bff0
--- /dev/null
+++ b/4.13_hack_license_as_kernel_devs_hate_us-part2.patch
@@ -0,0 +1,13 @@
+diff -uNrp a/kernel/nvidia-uvm/uvm_common.c b/kernel/nvidia-uvm/uvm_common.c
+--- a/kernel/nvidia-uvm/uvm_common.c 2017-09-20 02:33:10.000000000 +0100
++++ b/kernel/nvidia-uvm/uvm_common.c 2017-09-23 09:02:44.989610766 +0100
+@@ -388,5 +388,9 @@ module_param(uvm_enable_builtin_tests, i
+ MODULE_PARM_DESC(uvm_enable_builtin_tests,
+ "Enable the UVM built-in tests. (This is a security risk)");
+
++#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
++MODULE_LICENSE("Dual MIT/GPL");
++#else
+ MODULE_LICENSE("MIT");
++#endif
+ MODULE_INFO(supported, "external");
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index d970f32..c9163c9 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: 4.13_hack_license_as_kernel_devs_hate_us.patch
+Patch2: 4.13_hack_license_as_kernel_devs_hate_us-part1.patch
+Patch3: 4.13_hack_license_as_kernel_devs_hate_us-part2.patch
# needed for plague to make sure it builds for i586 and i686
ExclusiveArch: i686 x86_64 armv7hl
@@ -46,6 +47,9 @@ tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{versi
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%ifarch x86_64
+%patch3 -p1
+%endif
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}