diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-05-06 21:33:58 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-05-12 14:54:55 +0200 |
commit | fa5e5dc39669b4427830c546ede8709323b8276c (patch) | |
tree | 9277ff40e9c2908a6a78b8e887c0740cc5a86251 /arch/x86/kernel/jump_label.c | |
parent | f9510fa9caaf8229381d5f86ba0774bf1a6ca39b (diff) |
jump_label, x86: Introduce jump_entry_size()
This allows architectures to have variable sized jumps.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210506194157.786777050@infradead.org
Diffstat (limited to 'arch/x86/kernel/jump_label.c')
-rw-r--r-- | arch/x86/kernel/jump_label.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kernel/jump_label.c b/arch/x86/kernel/jump_label.c index 638d3b9be0ad..a29eecc14c94 100644 --- a/arch/x86/kernel/jump_label.c +++ b/arch/x86/kernel/jump_label.c @@ -16,6 +16,13 @@ #include <asm/alternative.h> #include <asm/text-patching.h> +#define JUMP_LABEL_NOP_SIZE JMP32_INSN_SIZE + +int arch_jump_entry_size(struct jump_entry *entry) +{ + return JMP32_INSN_SIZE; +} + static const void * __jump_label_set_jump_code(struct jump_entry *entry, enum jump_label_type type) { |