target/nios2: Rewrite interrupt handling
authorRichard Henderson <richard.henderson@linaro.org>
Sat, 26 Feb 2022 11:56:15 +0000 (01:56 -1000)
committerRichard Henderson <richard.henderson@linaro.org>
Thu, 3 Mar 2022 19:51:59 +0000 (09:51 -1000)
commitb72c9d5951f1dfa047f545408dd9e35597e6b9d3
tree9e3e33056b2417870a4e8aef8a84c54c7c3613ab
parent8d8d73b55144e0d8d3c15a83a8fd8f3de78c460d
target/nios2: Rewrite interrupt handling

Previously, we would avoid setting CPU_INTERRUPT_HARD when interrupts
are disabled at a particular point in time, instead queuing the value
into cpu->irq_pending.  This is more complicated than required.

Instead, set CPU_INTERRUPT_HARD any time there is a pending interrupt,
and exclusively check for interrupts disabled in nios2_cpu_exec_interrupt.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/nios2/cpu.c
target/nios2/cpu.h
target/nios2/helper.h
target/nios2/op_helper.c
target/nios2/translate.c