summaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/jump_label.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-05-23 11:35:33 +0900
committerPaul Mundt <lethal@linux-sh.org>2011-05-23 11:35:33 +0900
commit8ace5c4698ec8da53e69095596718d5a936433de (patch)
tree1f5959b3ac289e3bde420cc14109be0cc518a75a /arch/sparc/include/asm/jump_label.h
parenta375b15164dd9264f724ad941825e52c90145151 (diff)
parent71a8638480eb8fb6cfabe2ee9ca3fbc6e3453a14 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh-latest
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 @@
#define JUMP_LABEL_NOP_SIZE 4
-#define JUMP_LABEL(key, label) \
- do { \
- asm goto("1:\n\t" \
- "nop\n\t" \
- "nop\n\t" \
- ".pushsection __jump_table, \"a\"\n\t"\
- ".align 4\n\t" \
- ".word 1b, %l[" #label "], %c0\n\t" \
- ".popsection \n\t" \
- : : "i" (key) : : label);\
- } while (0)
+static __always_inline bool arch_static_branch(struct jump_label_key *key)
+{
+ asm goto("1:\n\t"
+ "nop\n\t"
+ "nop\n\t"
+ ".pushsection __jump_table, \"aw\"\n\t"
+ ".align 4\n\t"
+ ".word 1b, %l[l_yes], %c0\n\t"
+ ".popsection \n\t"
+ : : "i" (key) : : l_yes);
+ return false;
+l_yes:
+ return true;
+}
#endif /* __KERNEL__ */