1 diff --git a/kernel/nv-linux.h b/kernel/nv-linux.h
2 index e7068e3..3ac3c0b 100644
3 --- a/kernel/nv-linux.h
4 +++ b/kernel/nv-linux.h
5 @@ -270,7 +270,7 @@ RM_STATUS nvos_forward_error_to_cray(struct pci_dev *, NvU32,
7 extern int nv_pat_mode;
9 -#if !defined(NV_VMWARE) && defined(CONFIG_HOTPLUG_CPU)
10 +#if !defined(NV_VMWARE) && defined(CONFIG_HOTPLUG_CPU) && (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0))
11 #define NV_ENABLE_HOTPLUG_CPU
12 #include <linux/cpu.h> /* CPU hotplug support */
13 #include <linux/notifier.h> /* struct notifier_block, etc */
14 diff --git a/kernel/nv-pat.c b/kernel/nv-pat.c
15 index a725533..91070e0 100644
18 @@ -210,14 +210,20 @@ nvidia_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu
22 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
26 if (cpu == (NvUPtr)hcpu)
27 nv_setup_pat_entries(NULL);
29 NV_SMP_CALL_FUNCTION(nv_setup_pat_entries, hcpu, 1);
31 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
32 case CPU_DOWN_PREPARE:
34 + case CPU_DOWN_PREPARE_FROZEN:
36 if (cpu == (NvUPtr)hcpu)
37 nv_restore_pat_entries(NULL);