NVIDIA – Now, a Fix for 4.10-rc Kernels..

Thanks to Tomas Pruzina, there is a patch for NVIDIA driver 375.26 with 4.10-rc kernels.   Details, and the link, are here: https://devtalk.nvidia.com/default/topic/981993/linux/-patches-included-4-10-kernel-staging-/

Easiest way to get the patch is to select ‘Raw’ and just cut/paste the text..

I have tested this on kernel 4.10-rc2, and it compiles successfully (with a few warnings):

................................
 /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26.patched/kernel/nvidia-uvm/uvm8.c: In function ‘uvm_vm_fault_sigbus’:
 /usr/src/linux-4.10-rc2/include/linux/kern_levels.h:4:18: warning: format ‘%p’ expects argument of type ‘void *’, but argument 6 has type ‘long unsigned int’ [-Wformat=]
 #define KERN_SOH "\001" /* ASCII Start Of Header */
 ^
 /usr/src/linux-4.10-rc2/include/linux/printk.h:413:10: note: in definition of macro ‘printk_ratelimited’
 printk(fmt, ##__VA_ARGS__); \
 ^~~
 /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26.patched/kernel/nvidia-uvm/uvm_common.h:85:13: note: in expansion of macro ‘UVM_PRINT_FUNC_PREFIX’
 UVM_PRINT_FUNC_PREFIX(func, prefix, fmt, ##__VA_ARGS__); \
 ^~~~~~~~~~~~~~~~~~~~~
 /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26.patched/kernel/nvidia-uvm/uvm_common.h:99:5: note: in expansion of macro ‘UVM_PRINT_FUNC_PREFIX_CHECK’
 UVM_PRINT_FUNC_PREFIX_CHECK(printk_ratelimited, KERN_DEBUG NVIDIA_UVM_PRETTY_PRINTING_PREFIX, " " fmt, ##__VA_ARGS__)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
 /usr/src/linux-4.10-rc2/include/linux/kern_levels.h:14:20: note: in expansion of macro ‘KERN_SOH’
 #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
 ^~~~~~~~
 /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26.patched/kernel/nvidia-uvm/uvm_common.h:99:53: note: in expansion of macro ‘KERN_DEBUG’
 UVM_PRINT_FUNC_PREFIX_CHECK(printk_ratelimited, KERN_DEBUG NVIDIA_UVM_PRETTY_PRINTING_PREFIX, " " fmt, ##__VA_ARGS__)
 ^~~~~~~~~~
 /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26.patched/kernel/nvidia-uvm/uvm8.c:104:5: note: in expansion of macro ‘UVM_DBG_PRINT_RL’
 UVM_DBG_PRINT_RL("Fault to address 0x%p in disabled vma\n", vmf->address);
 ^~~~~~~~~~~~~~~~
 .................................
 Building modules, stage 2.
 MODPOST 4 modules
 CC /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26.patched/kernel/nvidia-drm.mod.o
 LD [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26.patched/kernel/nvidia-drm.ko
 CC /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26.patched/kernel/nvidia-modeset.mod.o
 LD [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26.patched/kernel/nvidia-modeset.ko
 CC /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26.patched/kernel/nvidia-uvm.mod.o
 LD [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26.patched/kernel/nvidia-uvm.ko
 CC /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26.patched/kernel/nvidia.mod.o
 LD [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26.patched/kernel/nvidia.ko
 make[2]: Leaving directory '/usr/src/linux-4.10-rc2'
 make[1]: Leaving directory '/usr/src/linux-4.10-rc2'

As is mentioned, the CONFIG_CPU_HOTPLUG code is simply ‘bypassed’, as this is very rarely needed by desktop/workstation users..

The patch is for 4.10-based kernels only, and is not backwards-compatible, in its current state..

Robert Gadsdon   January 2, 2017.


Leave a Reply

Your email address will not be published. Required fields are marked *