]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
riscv: Pass patch_text() the length in bytes
authorSamuel Holland <samuel.holland@sifive.com>
Wed, 27 Mar 2024 16:04:44 +0000 (09:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 May 2025 07:44:03 +0000 (09:44 +0200)
commitb9ded1fb298b29d758f9bb3f6532577fff89cdfe
tree4913baf5732c59b358e70e20c49233f5b0cbeb47
parent85484bc611385317bab84d16d8462f82c0390049
riscv: Pass patch_text() the length in bytes

commit 51781ce8f4486c3738a6c85175b599ad1be71f89 upstream.

patch_text_nosync() already handles an arbitrary length of code, so this
removes a superfluous loop and reduces the number of icache flushes.

Reviewed-by: Björn Töpel <bjorn@rivosinc.com>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240327160520.791322-6-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
[apply to v6.6]
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/riscv/include/asm/patch.h
arch/riscv/kernel/patch.c
arch/riscv/kernel/probes/kprobes.c
arch/riscv/net/bpf_jit_comp64.c