]> git.ipfire.org Git - thirdparty/linux.git/commit
riscv: asm: use .insn for making custom instructions
authorBen Dooks <ben.dooks@codethink.co.uk>
Fri, 24 Oct 2025 17:16:40 +0000 (18:16 +0100)
committerPaul Walmsley <pjw@kernel.org>
Tue, 28 Oct 2025 00:58:37 +0000 (18:58 -0600)
commit44aa25c000b41d7afcb030ac1b8a38f06dabef0a
treebc895131b307da0028e198b0968638caa55cb4c4
parent5fada1605733a427feff45147cef9455ce29620f
riscv: asm: use .insn for making custom instructions

The assembler has .insn for building custom instructions
now, so change the .4byte to .insn. This ensures the output
is marked as an instruction and not as data which may
confuse both debuggers and anything else that relies on
this sort of marking.

Add an ASM_INSN_I() wrapper in asm.h to allow the selecting
of how this is output so older assemblers are still good.

Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Link: https://lore.kernel.org/r/20251024171640.65232-1-ben.dooks@codethink.co.uk
Signed-off-by: Paul Walmsley <pjw@kernel.org>
arch/riscv/include/asm/asm.h
arch/riscv/include/asm/insn-def.h
arch/riscv/include/asm/vendor_extensions/mips.h