aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/jump_label.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/include/asm/jump_label.h')
-rw-r--r--arch/arm64/include/asm/jump_label.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/arm64/include/asm/jump_label.h b/arch/arm64/include/asm/jump_label.h
index b360c4c2b5e792..6aafbb7899916e 100644
--- a/arch/arm64/include/asm/jump_label.h
+++ b/arch/arm64/include/asm/jump_label.h
@@ -15,10 +15,6 @@
#define JUMP_LABEL_NOP_SIZE AARCH64_INSN_SIZE
-/*
- * Prefer the constraint "S" to support PIC with GCC. Clang before 19 does not
- * support "S" on a symbol with a constant offset, so we use "i" as a fallback.
- */
static __always_inline bool arch_static_branch(struct static_key * const key,
const bool branch)
{
@@ -27,9 +23,9 @@ static __always_inline bool arch_static_branch(struct static_key * const key,
" .pushsection __jump_table, \"aw\" \n\t"
" .align 3 \n\t"
" .long 1b - ., %l[l_yes] - . \n\t"
- " .quad (%[key] - .) + %[bit0] \n\t"
+ " .quad %c0 - . \n\t"
" .popsection \n\t"
- : : [key]"Si"(key), [bit0]"i"(branch) : : l_yes);
+ : : "i"(&((char *)key)[branch]) : : l_yes);
return false;
l_yes:
@@ -44,9 +40,9 @@ static __always_inline bool arch_static_branch_jump(struct static_key * const ke
" .pushsection __jump_table, \"aw\" \n\t"
" .align 3 \n\t"
" .long 1b - ., %l[l_yes] - . \n\t"
- " .quad (%[key] - .) + %[bit0] \n\t"
+ " .quad %c0 - . \n\t"
" .popsection \n\t"
- : : [key]"Si"(key), [bit0]"i"(branch) : : l_yes);
+ : : "i"(&((char *)key)[branch]) : : l_yes);
return false;
l_yes: