jump label: Introduce static_branch() interface
[deliverable/linux.git] / arch / mips / include / asm / jump_label.h
index 7622ccf75076d7f48c73ca555e4d18c9a753e37e..1881b316ca4503b07b5998968a799e625e4a5229 100644 (file)
 #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__ */
 
This page took 0.024455 seconds and 5 git commands to generate.