]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
riscv: kprobes: Move branch_rs2_idx to insn.h
authorNam Cao <namcao@linutronix.de>
Sun, 11 May 2025 21:17:53 +0000 (23:17 +0200)
committerPaul Walmsley <pjw@kernel.org>
Wed, 17 Sep 2025 00:46:43 +0000 (18:46 -0600)
commit5fe59140276d94f1390d062f5643f852270f8d95
treece20c5fa69144f2460da96e88b73420d0239bac6
parent2dfb75cd5695fa9db2ad90d1339330eda7a0239d
riscv: kprobes: Move branch_rs2_idx to insn.h

Similar to other instruction-processing macros/functions, branch_rs2_idx
should be in insn.h.

Move it into insn.h as RV_EXTRACT_RS2_REG. This new name matches the style
in insn.h.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/linux-riscv/107d4a6c1818bf169be2407b273a0483e6d55bbb.1747215274.git.namcao@linutronix.de/
[pjw@kernel.org: updated to use RV_X_MASK and to apply]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
arch/riscv/include/asm/insn.h
arch/riscv/kernel/probes/simulate-insn.c