[PATCH v2 04/13] RISC-V: Move riscv_insn_is_* macros into a common header

Andrew Jones ajones at ventanamicro.com
Wed Nov 30 07:44:23 PST 2022


On Mon, Nov 28, 2022 at 11:26:23AM +0100, Heiko Stuebner wrote:
> From: Heiko Stuebner <heiko.stuebner at vrull.eu>
> 
> Right now the riscv kernel has (at least) two independent sets
> of functions to check if an encoded instruction is of a specific
> type. One in kgdb and one kprobes simulate-insn code.
> 
> More parts of the kernel will probably need this in the future,
> so instead of allowing this duplication to go on further,
> move macros that do the function declaration in a common header,
> similar to at least aarch64.
> 
> Signed-off-by: Heiko Stuebner <heiko.stuebner at vrull.eu>
> ---
>  arch/riscv/include/asm/parse_asm.h       | 41 ++++++++++++++++----
>  arch/riscv/kernel/kgdb.c                 | 49 ++++++++----------------
>  arch/riscv/kernel/probes/simulate-insn.h | 26 +++----------
>  3 files changed, 54 insertions(+), 62 deletions(-)

Besides the missing auipc definition Conor found, LGTM

Reviewed-by: Andrew Jones <ajones at ventanamicro.com>



More information about the linux-riscv mailing list