Created attachment 528200 [details, diff] nvidia_uvm_lite.c patch for Kernel 4.14 Patch attached. ( Slightly modified version of patch found here: https://devtalk.nvidia.com/default/topic/1028812/linux/340-106-nvidia-uvm-ko-fails-to-build-under-kernel-4-14-13/ ) Before patch fails with the following error: /usr/src/linux-4.14.35-gentoo/include/linux/cpumask.h:748:36: note: in expansion of macro ‘for_each_cpu’ #define for_each_online_cpu(cpu) for_each_cpu((cpu), cpu_online_mask) ^~~~~~~~~~~~ /usr/src/linux-4.14.35-gentoo/include/linux/vmstat.h:216:2: note: in expansion of macro ‘for_each_online_cpu’ for_each_online_cpu(cpu) ^~~~~~~~~~~~~~~~~~~ /var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/kernel/uvm/nvidia_uvm_lite.c: At top level: /var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/kernel/uvm/nvidia_uvm_lite.c:857:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .fault = _fault, ^~~~~~ /var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/kernel/uvm/nvidia_uvm_lite.c:857:14: note: (near initialization for ‘uvmlite_vma_ops.fault’) /var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/kernel/uvm/nvidia_uvm_lite.c:887:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .fault = _sigbus_fault, ^~~~~~~~~~~~~ /var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/kernel/uvm/nvidia_uvm_lite.c:887:14: note: (near initialization for ‘counters_vma_ops.fault’) cc1: some warnings being treated as errors make[3]: *** [/usr/src/linux-4.14.35-gentoo/scripts/Makefile.build:329: /var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/kernel/uvm/nvidia_uvm_lite.o] Error 1 make[2]: *** [/usr/src/linux-4.14.35-gentoo/Makefile:1528: _module_/var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/kernel/uvm] Error 2 make[2]: Leaving directory '/usr/src/linux-4.14.35-gentoo' make[1]: *** [Makefile:146: sub-make] Error 2 make[1]: Leaving directory '/usr/src/linux-4.14.35-gentoo' NVIDIA: left KBUILD. nvidia-uvm.ko failed to build! make: *** [Makefile:216: nvidia-uvm.ko] Error 1 * ERROR: x11-drivers/nvidia-drivers-340.106::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-340.106::gentoo'`, * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-340.106::gentoo'`. * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-340.106/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-340.106/temp/environment'. * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/kernel/uvm' * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/'
See https://bugs.gentoo.org/635352
Looks like I raised the compatibility from 4.11 to 4.14 at one point. That was probably wrong as I now cannot find the build logs to support that.
Reverted.