Skip to contentSkip to conversation

include/linux/compiler*.h: define asm_volatile_goto

PATCH In review Nathan Chancellor 2 participants 2 messages May 31, 2019 – Jun 3, 2019 Stable branch

lore
Share & tools
lore
#0 lore raw

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

From: "[email protected]" <[email protected]>

commit 8bd66d147c88bd441178c7b4c774ae5a185f19b8 upstream.

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").

---

Hi Greg and Sasha,

Please pick up this patch for 4.19. It turns out that commit 13aceef06adf ("arm64: jump_label.h: use asm_volatile_goto macro instead of "asm goto"") was backported without this, which causes a build failure on arm64. This wasn't uncovered until now because clang didn't support asm goto so this code wasn't being compiled. Thankfully, that should change very soon :)

 include/linux/compiler_types.h | 4 ++++
 1 file changed, 4 insertions(+)
include/linux/compiler_types.h +4 -0
index db192becfec4..c2ded31a4cec 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.22.0.rc2
#1 lore raw
Quoted 15 lines · Nathan Chancellor

From: "[email protected]" <[email protected]>

commit 8bd66d147c88bd441178c7b4c774ae5a185f19b8 upstream.

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").

---

Quoted 8 lines

Hi Greg and Sasha,

Please pick up this patch for 4.19. It turns out that commit 13aceef06adf ("arm64: jump_label.h: use asm_volatile_goto macro instead of "asm goto"") was backported without this, which causes a build failure on arm64. This wasn't uncovered until now because clang didn't support asm goto so this code wasn't being compiled. Thankfully, that should change very soon :)

Now applied, thanks.

greg k-h