Skip to content

Commit f2c9d68

Browse files
ojedagregkh
authored andcommitted
arm64: jump_label.h: use asm_volatile_goto macro instead of "asm goto"
[ Upstream commit 13aceef ] All other uses of "asm goto" go through asm_volatile_goto, which avoids a miscompile when using GCC < 4.8.2. Replace our open-coded "asm goto" statements with the asm_volatile_goto macro to avoid issues with older toolchains. Cc: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7a2df42 commit f2c9d68

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/arm64/include/asm/jump_label.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
3030
{
31-
asm goto("1: nop\n\t"
31+
asm_volatile_goto("1: nop\n\t"
3232
".pushsection __jump_table, \"aw\"\n\t"
3333
".align 3\n\t"
3434
".quad 1b, %l[l_yes], %c0\n\t"
@@ -42,7 +42,7 @@ static __always_inline bool arch_static_branch(struct static_key *key, bool bran
4242

4343
static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch)
4444
{
45-
asm goto("1: b %l[l_yes]\n\t"
45+
asm_volatile_goto("1: b %l[l_yes]\n\t"
4646
".pushsection __jump_table, \"aw\"\n\t"
4747
".align 3\n\t"
4848
".quad 1b, %l[l_yes], %c0\n\t"

0 commit comments

Comments
 (0)