OSDN Git Service

target/nios2: Clean up nios2_cpu_do_interrupt
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 21 Apr 2022 15:17:03 +0000 (08:17 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 26 Apr 2022 15:16:41 +0000 (08:16 -0700)
commitd8c5521cc4ae34e313455bdb1d3c93e51ad88ee6
treee9ec0288e6b65e8d34a3055c7319c88e7879d1fd
parent24ca31346e41e80166c696dd04b33027b93d8559
target/nios2: Clean up nios2_cpu_do_interrupt

Split out do_exception and do_iic_irq to handle bulk of the interrupt and
exception processing.  Parameterize the changes required to cpu state.

The status.EH bit, which protects some data against double-faults,
is only present with the MMU.  Several exception cases did not check
for status.EH being set, as required.

The status.IH bit, which had been set by EXCP_IRQ, is exclusive to
the external interrupt controller, which we do not yet implement.
The internal interrupt controller, when the MMU is also present,
sets the status.EH bit.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220421151735.31996-33-richard.henderson@linaro.org>
target/nios2/helper.c