commit c756867b1ca2306724ffa82fe8b1b1fe8012456e
Author: Jan Palus <at...@pld-linux.org>
Date:   Fri Apr 6 23:11:07 2018 +0200

    quick fix for runtime failure with kernel 4.16
    
    nvidia: Unknown symbol swiotlb_map_sg_attrs (err 0)

 linux-4.16.patch              | 12 ++++++++++++
 xorg-driver-video-nvidia.spec |  2 ++
 2 files changed, 14 insertions(+)
---
diff --git a/xorg-driver-video-nvidia.spec b/xorg-driver-video-nvidia.spec
index 0906b4e..fdcd3ce 100644
--- a/xorg-driver-video-nvidia.spec
+++ b/xorg-driver-video-nvidia.spec
@@ -55,6 +55,7 @@ Source4:      10-nvidia.conf
 Source5:       10-nvidia-modules.conf
 Patch0:                X11-driver-nvidia-GL.patch
 Patch1:                X11-driver-nvidia-desktop.patch
+Patch2:                linux-4.16.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}}
@@ -268,6 +269,7 @@ rm -rf NVIDIA-Linux-x86*-%{version}*
 %endif
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> 
kernel/Makefile.kbuild
 
 %build
diff --git a/linux-4.16.patch b/linux-4.16.patch
new file mode 100644
index 0000000..8fd7e1d
--- /dev/null
+++ b/linux-4.16.patch
@@ -0,0 +1,12 @@
+diff -ur 
NVIDIA-Linux-x86_64-390.48-no-compat32.orig/kernel/common/inc/nv-linux.h 
NVIDIA-Linux-x86_64-390.48-no-compat32/kernel/common/inc/nv-linux.h
+--- NVIDIA-Linux-x86_64-390.48-no-compat32.orig/kernel/common/inc/nv-linux.h   
2018-04-06 23:06:17.967287478 +0200
++++ NVIDIA-Linux-x86_64-390.48-no-compat32/kernel/common/inc/nv-linux.h        
2018-04-06 23:06:31.980554716 +0200
+@@ -1209,7 +1209,7 @@
+ static inline NvBool nv_dma_maps_swiotlb(struct pci_dev *dev)
+ {
+     NvBool swiotlb_in_use = NV_FALSE;
+-#if defined(CONFIG_SWIOTLB)
++#if defined(CONFIG_SWIOTLB) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
+   #if defined(NV_DMA_OPS_PRESENT) || defined(NV_GET_DMA_OPS_PRESENT)
+     /*
+      * We only use the 'dma_ops' symbol on older x86_64 kernels; later 
kernels,
================================================================

---- gitweb:

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

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to