summarylogtreecommitdiffstats
path: root/kernel-5.3.patch
blob: c51a41d5d8f9de6df6c49207676a996585ea4ec1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
diff --git kernel/nv-linux.h kernel/nv-linux.h
index 4043bf1..62f0874 100644
--- kernel/nv-linux.h
+++ kernel/nv-linux.h
@@ -877,12 +877,21 @@ extern void *nv_stack_t_cache;
         __ret;                                               \
      })
 #elif (NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT == 3)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 0)
 #define NV_SMP_CALL_FUNCTION(func, info, wait)               \
     ({                                                       \
         int __ret = smp_call_function(func, info, wait);     \
         __ret;                                               \
      })
 #else
+#define NV_SMP_CALL_FUNCTION(func, info, wait)               \
+    ({                                                       \
+        int __ret = 0;                                       \
+        smp_call_function(func, info, wait);                 \
+        __ret;                                               \
+     })
+#endif
+#else
 #error "NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT value unrecognized!"
 #endif
 #elif defined(CONFIG_SMP)
@@ -897,12 +906,21 @@ extern void *nv_stack_t_cache;
         __ret;                                         \
      })
 #elif (NV_ON_EACH_CPU_ARGUMENT_COUNT == 3)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 0)
 #define NV_ON_EACH_CPU(func, info, wait)               \
     ({                                                 \
         int __ret = on_each_cpu(func, info, wait);     \
         __ret;                                         \
      })
 #else
+#define NV_ON_EACH_CPU(func, info, wait)               \
+    ({                                                 \
+        int __ret = 0;                                 \
+        on_each_cpu(func, info, wait);                 \
+        __ret;                                         \
+    })
+#endif
+#else
 #error "NV_ON_EACH_CPU_ARGUMENT_COUNT value unrecognized!"
 #endif
 #elif defined(CONFIG_SMP)