[PATCH] riscv: vector: only enable interrupts in the first-use trap

Björn Töpel bjorn at kernel.org
Tue Jun 27 00:25:35 PDT 2023


Andy Chiu <andy.chiu at sifive.com> writes:

> The function irqentry_exit_to_user_mode() must be called with interrupt
> disabled. The caller of do_trap_insn_illegal() also assumes running
> without interrupts. So, we should turn off interrupts after
> riscv_v_first_use_handler() returns.
>
> Fixes: cd054837243b ("riscv: Allocate user's vector context in the first-use trap")
> Signed-off-by: Andy Chiu <andy.chiu at sifive.com>

Good catch,
Reviewed-by: Björn Töpel <bjorn at rivosinc.com>



More information about the linux-riscv mailing list