aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/jump_label.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-05-06 21:34:01 +0200
committerIngo Molnar <mingo@kernel.org>2021-05-12 14:54:55 +0200
commite7bf1ba97afdde75b0ef43e4bdb718bf843613f1 (patch)
tree090e3ff09488c36c2becee9bc596f92d752ef6be /arch/x86/include/asm/jump_label.h
parentjump_label: Free jump_entry::key bit1 for build use (diff)
downloadlinux-dev-e7bf1ba97afdde75b0ef43e4bdb718bf843613f1.tar.xz
linux-dev-e7bf1ba97afdde75b0ef43e4bdb718bf843613f1.zip
jump_label, x86: Emit short JMP
Now that we can patch short JMP/NOP, allow the compiler/assembler to emit short JMP instructions. There is no way to have the assembler emit short NOPs based on the potential displacement, so leave those long for now. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20210506194157.967034497@infradead.org
Diffstat (limited to 'arch/x86/include/asm/jump_label.h')
-rw-r--r--arch/x86/include/asm/jump_label.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_label.h
index d85802a00629..ef819e33cfc1 100644
--- a/arch/x86/include/asm/jump_label.h
+++ b/arch/x86/include/asm/jump_label.h
@@ -35,8 +35,7 @@ l_yes:
static __always_inline bool arch_static_branch_jump(struct static_key * const key, const bool branch)
{
asm_volatile_goto("1:"
- ".byte 0xe9 \n\t"
- ".long %l[l_yes] - (. + 4) \n\t"
+ "jmp %l[l_yes]\n\t"
JUMP_TABLE_ENTRY
: : "i" (key), "i" (branch) : : l_yes);