]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
riscv: Enable interrupts during syscalls with M-Mode
authorDamien Le Moal <damien.lemoal@wdc.com>
Sun, 13 Dec 2020 13:50:36 +0000 (22:50 +0900)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Fri, 8 Jan 2021 02:04:25 +0000 (18:04 -0800)
commit643437b996bac9267785e0bd528332e2d5811067
tree74d64129a077a3d02bcc6e4d52d5e203d23bc6a4
parent1f1496a923b6ba16679074fe77100e1b53cdb880
riscv: Enable interrupts during syscalls with M-Mode

When running is M-Mode (no MMU config), MPIE does not get set. This
results in all syscalls being executed with interrupts disabled as
handle_exception never sets SR_IE as it always sees SR_PIE being
cleared. Fix this by always force enabling interrupts in
handle_syscall when CONFIG_RISCV_M_MODE is enabled.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/kernel/entry.S