Patch for compiling v384.98 modules with Linux v4.14.9+
Greetings, There has been some kernel headers reordering in Linux v4.14.9 and this caused the modules for the NVIDIA v384.98 drivers to fail to compile for me. Here is a patch allowing to fix this issue: [code] diff -durN nvidia-384-orig/nvidia-uvm/uvm8_va_block.c nvidia-384/nvidia-uvm/uvm8_va_block.c --- nvidia-384-orig/nvidia-uvm/uvm8_va_block.c 2017-12-26 11:20:17.097715622 +0100 +++ nvidia-384/nvidia-uvm/uvm8_va_block.c 2017-12-26 11:20:29.674381760 +0100 @@ -36,6 +36,10 @@ #include "uvm8_perf_prefetch.h" #include "uvm8_mem.h" +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,9) +#include <linux/sched/task_stack.h> +#endif + typedef enum { BLOCK_PTE_OP_MAP, [/code]
Greetings,

There has been some kernel headers reordering in Linux v4.14.9 and this caused the modules for the NVIDIA v384.98 drivers to fail to compile for me. Here is a patch allowing to fix this issue:

diff -durN nvidia-384-orig/nvidia-uvm/uvm8_va_block.c nvidia-384/nvidia-uvm/uvm8_va_block.c
--- nvidia-384-orig/nvidia-uvm/uvm8_va_block.c 2017-12-26 11:20:17.097715622 +0100
+++ nvidia-384/nvidia-uvm/uvm8_va_block.c 2017-12-26 11:20:29.674381760 +0100
@@ -36,6 +36,10 @@
#include "uvm8_perf_prefetch.h"
#include "uvm8_mem.h"

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,9)
+#include <linux/sched/task_stack.h>
+#endif
+
typedef enum
{
BLOCK_PTE_OP_MAP,

#1
Posted 12/26/2017 10:26 AM   
Same build issue, for v387.22 (short term) [code] ... /src/nvidia/NVIDIA-Linux-x86_64-387.22-no-compat32/kernel/nvidia-uvm/uvm8_va_block.c: In function ‘block_cpu_fault_locked’: /usr/src/linux-4.14.9-2.g9423ca2/arch/x86/include/asm/processor.h:826:39: error: implicit declaration of function ‘task_stack_page’; did you mean ‘task_stack_vm_area’? [-Werror=implicit-function-declaration] unsigned long __ptr = (unsigned long)task_stack_page(task); \ ... ^ [/code] Fix above, [code] ... +#include <linux/sched/task_stack.h> ... [/code] works for v387.22 as well.
Same build issue, for v387.22 (short term)

...
/src/nvidia/NVIDIA-Linux-x86_64-387.22-no-compat32/kernel/nvidia-uvm/uvm8_va_block.c: In function ‘block_cpu_fault_locked’:
/usr/src/linux-4.14.9-2.g9423ca2/arch/x86/include/asm/processor.h:826:39: error: implicit declaration of function ‘task_stack_page’; did you mean ‘task_stack_vm_area’? [-Werror=implicit-function-declaration]
unsigned long __ptr = (unsigned long)task_stack_page(task); \
... ^


Fix above,

...
+#include <linux/sched/task_stack.h>
...


works for v387.22 as well.

#2
Posted 12/26/2017 03:36 PM   
Too much went into 4.14.9 Some was reverted before releasing 4.14.9 So far one patch is pending a revert https://lkml.org/lkml/2017/12/26/306 They need to be more strict over what goes into -stable trees.
Too much went into 4.14.9
Some was reverted before releasing 4.14.9
So far one patch is pending a revert https://lkml.org/lkml/2017/12/26/306

They need to be more strict over what goes into -stable trees.

#3
Posted 12/27/2017 08:13 AM   
[quote=""]Too much went into 4.14.9 Some was reverted before releasing 4.14.9[/quote] Interesting piece of info, thank you ! [quote]So far one patch is pending a revert https://lkml.org/lkml/2017/12/26/306 [/quote] Well, it is unrelated with our issue here, since that pending revert affects IPv6 networking. [quote]They need to be more strict over what goes into -stable trees. [/quote] I was indeed surprised that a micro release bump of the Linux kernel caused such a havoc in headers... I guess reverting to v4.14.8 till the mess gets sorted out is the wisest approach...[/quote]
said:Too much went into 4.14.9
Some was reverted before releasing 4.14.9

Interesting piece of info, thank you !


So far one patch is pending a revert https://lkml.org/lkml/2017/12/26/306

Well, it is unrelated with our issue here, since that pending revert affects IPv6 networking.


They need to be more strict over what goes into -stable trees.

I was indeed surprised that a micro release bump of the Linux kernel caused such a havoc in headers...

I guess reverting to v4.14.8 till the mess gets sorted out is the wisest approach...

#4
Posted 12/28/2017 10:54 AM   
I ran into this issue on Ubuntu 16.04 with the HWE kernels.
I ran into this issue on Ubuntu 16.04 with the HWE kernels.

#5
Posted 01/17/2018 06:00 PM   
The patch is no more needed for current kernel (4.14.14) and driver (384.111).
The patch is no more needed for current kernel (4.14.14) and driver (384.111).

#6
Posted 01/17/2018 06:21 PM   
16.04 only has kernel version 4.13
16.04 only has kernel version 4.13

#7
Posted 01/17/2018 06:41 PM   
Scroll To Top

Add Reply