nvidia: disable swiotlb check for kernels newer 4.16

This commit is contained in:
David Flatz 2018-04-23 15:51:11 +02:00
parent 7319dfd726
commit 68adc39aa6
2 changed files with 18 additions and 0 deletions

View file

@ -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,

View file

@ -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() {