Skip to contentSkip to conversation

include/linux/compiler*.h: add version detection to asm_volatile_goto

PATCH In review [email protected] 3 participants 4 messages Oct 31, 2018 – Nov 3, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 include/linux/compiler*.h: add version detection to asm_volatile_goto

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

---
V1 -> V2: drop changes to include/linux/compiler-gcc.h.

 include/linux/compiler_types.h | 4 ++++
 1 file changed, 4 insertions(+)
include/linux/compiler_types.h +4 -0
index 97cfe29b3f0a..6f1cb84a687b 100644
@@ -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))
 
Signature · 1 line
2.19.1.568.g152ad8e336-goog
#1 lore raw
Quoted 2 lines · On Wed, Oct 31, 2018 at 11:29 AM <[email protected]> wrote:

V1 -> V2: drop changes to include/linux/compiler-gcc.h.

Now the subject line of the patch doesn't match the patch any more..

Linus

#2 lore raw

PATCH v3 1/1 include/linux/compiler*.h: define asm_volatile_goto

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

Fixes commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive").

---
V2 -> V3: update subject line & add reference to fixed commit. V1 -> V2: drop changes to include/linux/compiler-gcc.h.

 include/linux/compiler_types.h | 4 ++++
 1 file changed, 4 insertions(+)
include/linux/compiler_types.h +4 -0
index 97cfe29b3f0a..6f1cb84a687b 100644
@@ -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))
 
Signature · 1 line
2.19.1.568.g152ad8e336-goog
#3 lore raw

Re: [PATCH v3] include/linux/compiler*.h: define asm_volatile_goto

Quoted 3 lines · On Wed, Oct 31, 2018 at 8:39 PM <[email protected]> wrote:

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

Picking this up into compiler-attributes.

Cheers,
Miguel