linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] include/linux/compiler*.h: add version detection to asm_volatile_goto
@ 2018-10-31 18:29 ndesaulniers
  2018-10-31 18:36 ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: ndesaulniers @ 2018-10-31 18:29 UTC (permalink / raw)
  To: torvalds
  Cc: akpm, miguel.ojeda.sandonis, Nick Desaulniers, Masahiro Yamada,
	Paul Burton, Arnd Bergmann, Greg Kroah-Hartman, Kees Cook,
	linux-kernel

asm_volatile_goto should also be defined for other compilers that support
asm goto.

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-11-03 13:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-31 18:29 [PATCH v2] include/linux/compiler*.h: add version detection to asm_volatile_goto ndesaulniers
2018-10-31 18:36 ` Linus Torvalds
2018-10-31 19:39   ` [PATCH v3] include/linux/compiler*.h: define asm_volatile_goto ndesaulniers
2018-11-03 13:10     ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).