OSDN Git Service

nvic: Don't apply group priority mask to negative priorities
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 14 Sep 2017 17:43:17 +0000 (18:43 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 14 Sep 2017 17:43:17 +0000 (18:43 +0100)
commit22a9c26af62f9772b7c0512e88f97d0d1f2e0872
treeaed57ca516513b057c8a3277a0919973704742c7
parentc6158878650c01b2c753b2ea7d0967c8fe5ca59e
nvic: Don't apply group priority mask to negative priorities

In several places we were unconditionally applying the
nvic_gprio_mask() to a priority value. This is incorrect
if the priority is one of the fixed negative priority
values (for NMI and HardFault), so don't do it.

This bug would have caused both NMI and HardFault to be
considered as the same priority and so NMI wouldn't
correctly preempt HardFault.

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