]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/intc/armv7m_nvic: ISCR.ISRPENDING is set for non-enabled pending interrupts
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 23 Jul 2021 16:21:44 +0000 (17:21 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 27 Jul 2021 09:57:39 +0000 (10:57 +0100)
commit41487794f5af977e992870e18521bed88daa68d5
tree97425fa3b533a9ebe5b202d5d319d04ad218372d
parentd4f6883912dba8a710274e2364c440c210e4ec65
hw/intc/armv7m_nvic: ISCR.ISRPENDING is set for non-enabled pending interrupts

The ISCR.ISRPENDING bit is set when an external interrupt is pending.
This is true whether that external interrupt is enabled or not.
This means that we can't use 's->vectpending == 0' as a shortcut to
"ISRPENDING is zero", because s->vectpending indicates only the
highest priority pending enabled interrupt.

Remove the incorrect optimization so that if there is no pending
enabled interrupt we fall through to scanning through the whole
interrupt array.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210723162146.5167-5-peter.maydell@linaro.org
hw/intc/armv7m_nvic.c