Commit 13aceef0 authored by Miguel Ojeda's avatar Miguel Ojeda Committed by Will Deacon

arm64: jump_label.h: use asm_volatile_goto macro instead of "asm goto"

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: default avatarNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: default avatarMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 11da3a7f
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
static __always_inline bool arch_static_branch(struct static_key *key, bool branch) static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
{ {
asm goto("1: nop\n\t" asm_volatile_goto("1: nop\n\t"
".pushsection __jump_table, \"aw\"\n\t" ".pushsection __jump_table, \"aw\"\n\t"
".align 3\n\t" ".align 3\n\t"
".quad 1b, %l[l_yes], %c0\n\t" ".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 ...@@ -42,7 +42,7 @@ static __always_inline bool arch_static_branch(struct static_key *key, bool bran
static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch) static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch)
{ {
asm goto("1: b %l[l_yes]\n\t" asm_volatile_goto("1: b %l[l_yes]\n\t"
".pushsection __jump_table, \"aw\"\n\t" ".pushsection __jump_table, \"aw\"\n\t"
".align 3\n\t" ".align 3\n\t"
".quad 1b, %l[l_yes], %c0\n\t" ".quad 1b, %l[l_yes], %c0\n\t"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment