]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
riscv: Move all duplicate insn parsing macros into asm/insn.h
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Fri, 20 Jun 2025 20:21:59 +0000 (20:21 +0000)
committerPaul Walmsley <pjw@kernel.org>
Tue, 16 Sep 2025 22:29:07 +0000 (16:29 -0600)
commita601732236834a84e110508e884dc8d368d99d07
treea516826efa0b4f46c77c0fd16b7d8493c3c24a05
parent833bbb0d91d21694ec0d8909b6c71f5df448c575
riscv: Move all duplicate insn parsing macros into asm/insn.h

kernel/traps_misaligned.c and kvm/vcpu_insn.c define the same macros to
extract information from the instructions.

Let's move the definitions into asm/insn.h to avoid this duplication.

Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Clément Léger <cleger@rivosinc.com>
Link: https://lore.kernel.org/r/20250620-dev-alex-insn_duplicate_v5_manual-v5-3-d865dc9ad180@rivosinc.com
[pjw@kernel.org: updated to apply]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
arch/riscv/include/asm/insn.h
arch/riscv/kernel/traps_misaligned.c
arch/riscv/kvm/vcpu_insn.c