• P
    armv7m: Fix condition check for taking exceptions · 7ecdaa4a
    Peter Maydell 提交于
    The M profile condition for when we can take a pending exception or
    interrupt is not the same as that for A/R profile.  The code
    originally copied from the A/R profile version of the
    cpu_exec_interrupt function only worked by chance for the
    very simple case of exceptions being masked by PRIMASK.
    Replace it with a call to a function in the NVIC code that
    correctly compares the priority of the pending exception
    against the current execution priority of the CPU.
    
    [Michael Davidsaver's patchset had a patch to do something
    similar but the implementation ended up being a rewrite.]
    Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
    7ecdaa4a
armv7m_nvic.c 32.0 KB