[PATCH v1] riscv: add hardware error trap handler support

Paul Walmsley pjw at kernel.org
Thu Feb 12 18:52:18 PST 2026


Hi,

On Mon, 2 Feb 2026, "$(name)" <$(mail address)> wrote:

Looks like your mail user agent is broken - can you fix that, please?

> From: Rui Qi <qirui.001 at bytedance.com>
> 
> adds support for handling hardware error traps (exception code 19)
> in the RISC-V architecture. The changes include:
> 
> - Add do_trap_hardware_error function declaration in asm-prototypes.h
> - Add hardware error trap vector entry in entry.S exception vector table
> - Implement do_trap_hardware_error handler in traps.c that generates
>   SIGBUS with BUS_MCEERR_AR for hardware errors
> 
> This enables proper handling of hardware error exceptions that may occur
> in RISC-V systems, providing appropriate error reporting and signal
> generation for user space processes.
> 
> Signed-off-by: Rui Qi <qirui.001 at bytedance.com>

Thanks, queued for v7.1.


- Paul



More information about the linux-riscv mailing list