2019-12-04 03:53:58 +08:00
|
|
|
From df6b6227e19b46cf23abca790570804872cbf87c Mon Sep 17 00:00:00 2001
|
|
|
|
From: Alberto Milone <alberto.milone@canonical.com>
|
|
|
|
Date: Tue, 13 Aug 2019 11:20:39 +0200
|
|
|
|
Subject: [PATCH 1/1] Add support for Linux 5.3
|
|
|
|
smp_call_function() and on_each_cpu() no longer have return values
|
|
|
|
as per commit caa759323c73676b3e48c8d9c86093c88b4aba97
|
|
|
|
---
|
|
|
|
nv-linux.h | 18 ++++++++++++++++++
|
|
|
|
1 file changed, 18 insertions(+)
|
|
|
|
diff --git a/nv-linux.h b/nv-linux.h
|
2019-09-20 11:33:49 +08:00
|
|
|
index 4043bf1..62f0874 100644
|
2019-12-04 03:53:58 +08:00
|
|
|
--- a/nv-linux.h
|
|
|
|
+++ b/nv-linux.h
|
2019-09-20 11:33:49 +08:00
|
|
|
@@ -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)
|
2019-12-04 03:53:58 +08:00
|
|
|
--
|
|
|
|
2.20.1
|
2019-09-20 11:33:49 +08:00
|
|
|
|