commit 028b8ade85a75131792dd0816ce2a4e3ea0d9eb1
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Wed Mar 7 07:16:23 2018 +0000
Patch for 4.16 kernel
kernel_4.16.patch | 21 +++++++++++++++++++++
nvidia-kmod.spec | 7 ++++++-
2 files changed, 27 insertions(+), 1 deletion(-)
---
diff --git a/kernel_4.16.patch b/kernel_4.16.patch
new file mode 100644
index 0000000..3c31fc9
--- /dev/null
+++ b/kernel_4.16.patch
@@ -0,0 +1,21 @@
+--- a/kernel/common/inc/nv-linux.h
++++ b/kernel/common/inc/nv-linux.h
+@@ -1209,6 +1209,8 @@
+ static inline NvBool nv_dma_maps_swiotlb(struct pci_dev *dev)
+ {
+ NvBool swiotlb_in_use = NV_FALSE;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
++#if 0
+ #if defined(CONFIG_SWIOTLB)
+ #if defined(NV_DMA_OPS_PRESENT) || defined(NV_GET_DMA_OPS_PRESENT)
+ /*
+@@ -1251,6 +1253,8 @@
+ swiotlb_in_use = (swiotlb == 1);
+ #endif
+ #endif
++#endif
++#endif
+
+ return swiotlb_in_use;
+ }
+
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index cb203a4..fd665fd 100644
--- a/nvidia-kmod.spec
+++ b/nvidia-kmod.spec
@@ -10,7 +10,7 @@ Name: nvidia-kmod
Epoch: 3
Version: 390.25
# Taken over by kmodtool
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -20,6 +20,7 @@ Source11: nvidia-kmodtool-excludekernel-filterfile
Patch0: nv-linux-arm.patch
Patch1: nv-linux-arm2.patch
Patch2: kernel_4.15.patch
+Patch3: kernel_4.16.patch
# needed for plague to make sure it builds for i586 and i686
ExclusiveArch: i686 x86_64 armv7hl
@@ -46,6 +47,7 @@ tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{versi
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
@@ -73,6 +75,9 @@ done
%changelog
+* Tue Mar 06 2018 Leigh Scott <leigh123linux(a)googlemail.com> - 3:390.25-6
+- Patch for 4.16 kernel
+
* Fri Mar 02 2018 RPM Fusion Release Engineering <leigh123linux(a)googlemail.com> -
3:390.25-5
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild