]>
Commit | Line | Data |
---|---|---|
52734aa6 GKH |
1 | From foo@baz Mon Oct 8 18:07:05 CEST 2018 |
2 | From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> | |
3 | Date: Sun, 9 Sep 2018 17:47:31 +0200 | |
4 | Subject: arm64: jump_label.h: use asm_volatile_goto macro instead of "asm goto" | |
5 | ||
6 | From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> | |
7 | ||
8 | [ Upstream commit 13aceef06adfaf93d52e01e28a8bc8a0ad471d83 ] | |
9 | ||
10 | All other uses of "asm goto" go through asm_volatile_goto, which avoids | |
11 | a miscompile when using GCC < 4.8.2. Replace our open-coded "asm goto" | |
12 | statements with the asm_volatile_goto macro to avoid issues with older | |
13 | toolchains. | |
14 | ||
15 | Cc: Catalin Marinas <catalin.marinas@arm.com> | |
16 | Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> | |
17 | Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> | |
18 | Signed-off-by: Will Deacon <will.deacon@arm.com> | |
19 | Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> | |
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
21 | --- | |
22 | arch/arm64/include/asm/jump_label.h | 4 ++-- | |
23 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
24 | ||
25 | --- a/arch/arm64/include/asm/jump_label.h | |
26 | +++ b/arch/arm64/include/asm/jump_label.h | |
27 | @@ -28,7 +28,7 @@ | |
28 | ||
29 | static __always_inline bool arch_static_branch(struct static_key *key, bool branch) | |
30 | { | |
31 | - asm goto("1: nop\n\t" | |
32 | + asm_volatile_goto("1: nop\n\t" | |
33 | ".pushsection __jump_table, \"aw\"\n\t" | |
34 | ".align 3\n\t" | |
35 | ".quad 1b, %l[l_yes], %c0\n\t" | |
36 | @@ -42,7 +42,7 @@ l_yes: | |
37 | ||
38 | static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch) | |
39 | { | |
40 | - asm goto("1: b %l[l_yes]\n\t" | |
41 | + asm_volatile_goto("1: b %l[l_yes]\n\t" | |
42 | ".pushsection __jump_table, \"aw\"\n\t" | |
43 | ".align 3\n\t" | |
44 | ".quad 1b, %l[l_yes], %c0\n\t" |