Skip to contentSkip to conversation

ARM: Fix disable interrupt for M profile

PATCH New Fabien Chouteau 1 participant 1 message May 31, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: Fix disable interrupt for M profile

Fix the condition according to the requirement in the comment above. Otherwise it's not possible to disable interrupt on M-profile.

---
V2: The expression in the previous patch was wrong.

 cpu-exec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
cpu-exec.c +2 -2
index 31c089d..8626e78 100644
@@ -462,8 +462,8 @@ int cpu_exec(CPUArchState *env)
                        We avoid this by disabling interrupts when
                        pc contains a magic address.  */
                     if (interrupt_request & CPU_INTERRUPT_HARD
-                        && ((IS_M(env) && env->regs[15] < 0xfffffff0)
-                            || !(env->uncached_cpsr & CPSR_I))) {
+                        && (!IS_M(env) || env->regs[15] < 0xfffffff0)
+                        && !(env->uncached_cpsr & CPSR_I)) {
                         env->exception_index = EXCP_IRQ;
                         cc->do_interrupt(cpu);
                         next_tb = 0;
Signature · 1 line
1.7.9.5