diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-05-06 22:33:58 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-05-12 15:54:55 +0300 |
commit | fa5e5dc39669b4427830c546ede8709323b8276c (patch) | |
tree | 9277ff40e9c2908a6a78b8e887c0740cc5a86251 /include/linux | |
parent | f9510fa9caaf8229381d5f86ba0774bf1a6ca39b (diff) | |
download | linux-fa5e5dc39669b4427830c546ede8709323b8276c.tar.xz |
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 'include/linux')
-rw-r--r-- | include/linux/jump_label.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index 05f5554d860f..8c45f58292ac 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h @@ -176,6 +176,15 @@ static inline void jump_entry_set_init(struct jump_entry *entry) entry->key |= 2; } +static inline int jump_entry_size(struct jump_entry *entry) +{ +#ifdef JUMP_LABEL_NOP_SIZE + return JUMP_LABEL_NOP_SIZE; +#else + return arch_jump_entry_size(entry); +#endif +} + #endif #endif |