diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-04-27 12:38:30 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-04-27 12:40:21 +0400 |
commit | 32673822e440eb92eb334631eb0a199d0c532d13 (patch) | |
tree | c1e55c1793fa17937d9b8e0a9a2946583f1948d5 /arch/mips/include/asm | |
parent | fa7b69475a6c192853949ba496dd9c37b497b548 (diff) | |
parent | 5373db886b791b2bc7811e2c115377916c409a5d (diff) | |
download | linux-32673822e440eb92eb334631eb0a199d0c532d13.tar.xz |
Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core
Conflicts:
include/linux/perf_event.h
Merge reason: pick up the latest jump-label enhancements, they are cooked ready.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/mips/include/asm')
-rw-r--r-- | arch/mips/include/asm/jump_label.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/arch/mips/include/asm/jump_label.h b/arch/mips/include/asm/jump_label.h index 7622ccf75076..1881b316ca45 100644 --- a/arch/mips/include/asm/jump_label.h +++ b/arch/mips/include/asm/jump_label.h @@ -20,16 +20,18 @@ #define WORD_INSN ".word" #endif -#define JUMP_LABEL(key, label) \ - do { \ - asm goto("1:\tnop\n\t" \ - "nop\n\t" \ - ".pushsection __jump_table, \"a\"\n\t" \ - WORD_INSN " 1b, %l[" #label "], %0\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:\tnop\n\t" + "nop\n\t" + ".pushsection __jump_table, \"aw\"\n\t" + WORD_INSN " 1b, %l[l_yes], %0\n\t" + ".popsection\n\t" + : : "i" (key) : : l_yes); + return false; +l_yes: + return true; +} #endif /* __KERNEL__ */ |