Received: from eggs.gnu.org ([2001:4830:134:3::10]:46411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiLWS-0005in-TR for qemu-devel@nongnu.org; Fri, 31 May 2013 05:21:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UiLWP-0007zQ-2F for qemu-devel@nongnu.org; Fri, 31 May 2013 05:21:20 -0400 Received: from mel.act-europe.fr ([194.98.77.210]:42315 helo=smtp.eu.adacore.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiLWO-0007zG-SQ for qemu-devel@nongnu.org; Fri, 31 May 2013 05:21:16 -0400 From: Fabien Chouteau Date: Fri, 31 May 2013 11:20:40 +0200 Message-Id: <1369992040-4039-1-git-send-email-chouteau@adacore.com> Subject: [Qemu-devel] [PATCH V2] ARM: Fix disable interrupt for M profile List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: blauwirbel@gmail.com, peter.maydell@linaro.org, pbonzini@redhat.com, afaerber@suse.de, rth@twiddle.net Fix the condition according to the requirement in the comment above. Otherwise it's not possible to disable interrupt on M-profile. Signed-off-by: Fabien Chouteau --- V2: The expression in the previous patch was wrong. cpu-exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index 31c089d..8626e78 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -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; -- 1.7.9.5