[PATCH v4] riscv: probes: simulate c.jal instruction

Charlie Jenkins thecharlesjenkins at gmail.com
Mon Jun 29 23:20:12 PDT 2026


On Sat, Jun 27, 2026 at 12:59:50PM +0200, Nam Cao wrote:
> Charlie Jenkins <thecharlesjenkins at gmail.com> writes:
> > I was looking at this recently trying to figure out why this hadn't been
> > implemented and couldn't determine why this one was special, it might be
> > because it is 32-bit only.
> 
> Yes. When I looked into this, I had no idea how to test rv32, so I skipped it.
> 
> > Since it is 32-bit only, can you put ifdefs
> > around it for riscv32 (#if __riscv_xlen == 32) ?
> 
> Except for slightly bigger kernel size, it does not hurt to keep. And
> #if stuff is quite ugly. But I'm fine with it either way.

Yeah that's fair it's not necessary. The thought was for
"documentation"/ just letting people know that it's a riscv32
instruction but it's probably better to just leave that off.

- Charlie

> 
> > Can you also add a test case to:
> > arch/riscv/kernel/tests/kprobes/test-kprobes-asm.S?
> 
> I already have a patch adding test case. Let me send it.
> 
> Nam



More information about the linux-riscv mailing list