|
@@ -37,7 +37,8 @@ static __always_inline bool arch_static_branch(struct static_key *key, bool bran
|
|
|
".byte " __stringify(STATIC_KEY_INIT_NOP) "\n\t"
|
|
|
".pushsection __jump_table, \"aw\" \n\t"
|
|
|
_ASM_ALIGN "\n\t"
|
|
|
- _ASM_PTR "1b, %l[l_yes], %c0 + %c1 \n\t"
|
|
|
+ ".long 1b - ., %l[l_yes] - . \n\t"
|
|
|
+ _ASM_PTR "%c0 + %c1 - .\n\t"
|
|
|
".popsection \n\t"
|
|
|
: : "i" (key), "i" (branch) : : l_yes);
|
|
|
|
|
@@ -53,7 +54,8 @@ static __always_inline bool arch_static_branch_jump(struct static_key *key, bool
|
|
|
"2:\n\t"
|
|
|
".pushsection __jump_table, \"aw\" \n\t"
|
|
|
_ASM_ALIGN "\n\t"
|
|
|
- _ASM_PTR "1b, %l[l_yes], %c0 + %c1 \n\t"
|
|
|
+ ".long 1b - ., %l[l_yes] - . \n\t"
|
|
|
+ _ASM_PTR "%c0 + %c1 - .\n\t"
|
|
|
".popsection \n\t"
|
|
|
: : "i" (key), "i" (branch) : : l_yes);
|
|
|
|
|
@@ -62,18 +64,6 @@ l_yes:
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
-#ifdef CONFIG_X86_64
|
|
|
-typedef u64 jump_label_t;
|
|
|
-#else
|
|
|
-typedef u32 jump_label_t;
|
|
|
-#endif
|
|
|
-
|
|
|
-struct jump_entry {
|
|
|
- jump_label_t code;
|
|
|
- jump_label_t target;
|
|
|
- jump_label_t key;
|
|
|
-};
|
|
|
-
|
|
|
#else /* __ASSEMBLY__ */
|
|
|
|
|
|
.macro STATIC_JUMP_IF_TRUE target, key, def
|
|
@@ -88,7 +78,8 @@ struct jump_entry {
|
|
|
.endif
|
|
|
.pushsection __jump_table, "aw"
|
|
|
_ASM_ALIGN
|
|
|
- _ASM_PTR .Lstatic_jump_\@, \target, \key
|
|
|
+ .long .Lstatic_jump_\@ - ., \target - .
|
|
|
+ _ASM_PTR \key - .
|
|
|
.popsection
|
|
|
.endm
|
|
|
|
|
@@ -104,7 +95,8 @@ struct jump_entry {
|
|
|
.endif
|
|
|
.pushsection __jump_table, "aw"
|
|
|
_ASM_ALIGN
|
|
|
- _ASM_PTR .Lstatic_jump_\@, \target, \key + 1
|
|
|
+ .long .Lstatic_jump_\@ - ., \target - .
|
|
|
+ _ASM_PTR \key + 1 - .
|
|
|
.popsection
|
|
|
.endm
|
|
|
|