aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-06-15 17:41:42 +0200
committerPeter Zijlstra <peterz@infradead.org>2022-06-24 09:48:55 +0200
commit7e6b9db27de9f69a705c1a046d45882c768e16c3 (patch)
tree4d17aca7fd1d19374a41639fede3095b1117bb0e /arch/arc/kernel
parentjump_label: mips: move module NOP patching into arch code (diff)
downloadlinux-dev-7e6b9db27de9f69a705c1a046d45882c768e16c3.tar.xz
linux-dev-7e6b9db27de9f69a705c1a046d45882c768e16c3.zip
jump_label: make initial NOP patching the special case
Instead of defaulting to patching NOP opcodes at init time, and leaving it to the architectures to override this if this is not needed, switch to a model where doing nothing is the default. This is the common case by far, as only MIPS requires NOP patching at init time. On all other architectures, the correct encodings are emitted by the compiler and so no initial patching is needed. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20220615154142.1574619-4-ardb@kernel.org
Diffstat (limited to 'arch/arc/kernel')
-rw-r--r--arch/arc/kernel/jump_label.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/arch/arc/kernel/jump_label.c b/arch/arc/kernel/jump_label.c
index b8600dc325b5..70b74a5d047b 100644
--- a/arch/arc/kernel/jump_label.c
+++ b/arch/arc/kernel/jump_label.c
@@ -96,19 +96,6 @@ void arch_jump_label_transform(struct jump_entry *entry,
flush_icache_range(entry->code, entry->code + JUMP_LABEL_NOP_SIZE);
}
-void arch_jump_label_transform_static(struct jump_entry *entry,
- enum jump_label_type type)
-{
- /*
- * We use only one NOP type (1x, 4 byte) in arch_static_branch, so
- * there's no need to patch an identical NOP over the top of it here.
- * The generic code calls 'arch_jump_label_transform' if the NOP needs
- * to be replaced by a branch, so 'arch_jump_label_transform_static' is
- * never called with type other than JUMP_LABEL_NOP.
- */
- BUG_ON(type != JUMP_LABEL_NOP);
-}
-
#ifdef CONFIG_ARC_DBG_JUMP_LABEL
#define SELFTEST_MSG "ARC: instruction generation self-test: "