]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.4.160/arm64-jump_label.h-use-asm_volatile_goto-macro-instead-of-asm-goto.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.4.160 / arm64-jump_label.h-use-asm_volatile_goto-macro-instead-of-asm-goto.patch
CommitLineData
52734aa6
GKH
1From foo@baz Mon Oct 8 18:07:05 CEST 2018
2From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
3Date: Sun, 9 Sep 2018 17:47:31 +0200
4Subject: arm64: jump_label.h: use asm_volatile_goto macro instead of "asm goto"
5
6From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
7
8[ Upstream commit 13aceef06adfaf93d52e01e28a8bc8a0ad471d83 ]
9
10All other uses of "asm goto" go through asm_volatile_goto, which avoids
11a miscompile when using GCC < 4.8.2. Replace our open-coded "asm goto"
12statements with the asm_volatile_goto macro to avoid issues with older
13toolchains.
14
15Cc: Catalin Marinas <catalin.marinas@arm.com>
16Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
17Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
18Signed-off-by: Will Deacon <will.deacon@arm.com>
19Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
20Signed-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"