jump label: Introduce static_branch() interface
[deliverable/linux.git] / arch / sparc / include / asm / jump_label.h
index 427d4684e0d239bbafe9238a01a2713e423ff9b7..fc73a82366f847f6c9821b0a10da9a35901b9cf2 100644 (file)
@@ -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__ */
 
This page took 0.0246189999999999 seconds and 5 git commands to generate.