[PATCH v2] include/linux/compiler*.h: add version detection to asm_volatile_goto
From: ndesaulniers
Date: Wed Oct 31 2018 - 14:29:35 EST
asm_volatile_goto should also be defined for other compilers that support
asm goto.
Signed-off-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
---
V1 -> V2: drop changes to include/linux/compiler-gcc.h.
include/linux/compiler_types.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 97cfe29b3f0a..6f1cb84a687b 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -151,6 +151,10 @@ struct ftrace_likely_data {
#define __assume_aligned(a, ...)
#endif
+#ifndef asm_volatile_goto
+#define asm_volatile_goto(x...) asm goto(x)
+#endif
+
/* Are two types/vars the same type (ignoring qualifiers)? */
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
--
2.19.1.568.g152ad8e336-goog