aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/jump_label.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/include/asm/jump_label.h')
-rw-r--r--arch/sparc/include/asm/jump_label.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/arch/sparc/include/asm/jump_label.h b/arch/sparc/include/asm/jump_label.h
index 427d4684e0d..fc73a82366f 100644
--- a/arch/sparc/include/asm/jump_label.h
+++ b/arch/sparc/include/asm/jump_label.h
@@ -7,17 +7,20 @@
7 7
8#define JUMP_LABEL_NOP_SIZE 4 8#define JUMP_LABEL_NOP_SIZE 4
9 9
10#define JUMP_LABEL(key, label) \ 10static __always_inline bool arch_static_branch(struct jump_label_key *key)
11 do { \ 11{
12 asm goto("1:\n\t" \ 12 asm goto("1:\n\t"
13 "nop\n\t" \ 13 "nop\n\t"
14 "nop\n\t" \ 14 "nop\n\t"
15 ".pushsection __jump_table, \"a\"\n\t"\ 15 ".pushsection __jump_table, \"aw\"\n\t"
16 ".align 4\n\t" \ 16 ".align 4\n\t"
17 ".word 1b, %l[" #label "], %c0\n\t" \ 17 ".word 1b, %l[l_yes], %c0\n\t"
18 ".popsection \n\t" \ 18 ".popsection \n\t"
19 : : "i" (key) : : label);\ 19 : : "i" (key) : : l_yes);
20 } while (0) 20 return false;
21l_yes:
22 return true;
23}
21 24
22#endif /* __KERNEL__ */ 25#endif /* __KERNEL__ */
23 26