diff --git a/srcpkgs/nvidia/files/nvidia-swiotlb-linux_4_16.patch b/srcpkgs/nvidia/files/nvidia-swiotlb-linux_4_16.patch new file mode 100644 index 00000000000..b9f32b1490f --- /dev/null +++ b/srcpkgs/nvidia/files/nvidia-swiotlb-linux_4_16.patch @@ -0,0 +1,14 @@ +disable check for swiotlb for kernels newer as 4.16 because it uses a symbol +that isn't exported anymore + +--- kernel/common/inc/nv-linux.h.orig 2018-04-23 14:33:53.184275029 +0200 ++++ kernel/common/inc/nv-linux.h 2018-04-23 15:26:38.892322165 +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, diff --git a/srcpkgs/nvidia/template b/srcpkgs/nvidia/template index cea7826ecab..79f9f3494d9 100644 --- a/srcpkgs/nvidia/template +++ b/srcpkgs/nvidia/template @@ -44,6 +44,10 @@ do_extract() { nvidia-uvm8_va_block-linux_4_14_9.patch patch -p0 < nvidia-uvm8_va_block-linux_4_14_9.patch fi + cd ${_pkg} + cp ${FILESDIR}/nvidia-swiotlb-linux_4_16.patch \ + nvidia-swiotlb-linux_4_16.patch + patch -p0 < nvidia-swiotlb-linux_4_16.patch } pre_install() {