Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760081Ab3EBOd5 (ORCPT ); Thu, 2 May 2013 10:33:57 -0400 Received: from www.linutronix.de ([62.245.132.108]:39897 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759740Ab3EBOd4 (ORCPT ); Thu, 2 May 2013 10:33:56 -0400 Date: Thu, 2 May 2013 16:33:52 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds cc: Jonas Gorski , eunb.song@samsung.com, "ralf@linux-mips.org" , "linux-mips@linux-mips.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH] MIPS: Enable interrupts in arch_cpu_idle() In-Reply-To: Message-ID: References: <20522420.158691367384219315.JavaMail.weblogic@epml17> User-Agent: Alpine 2.02 (LFD 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1453 Lines: 44 commit cdbedc61c8 (mips: Use generic idle loop) broke MIPS as I did not realize that MIPS wants to invoke the wait instructions with interrupts enabled. Don't ask why that works correctly; Ralf suggested to get thoroughly drunk before even thinking about it. Looking sober at commit c65a5480 ([MIPS] Fix potential latency problem due to non-atomic cpu_wait) is not recommended. Enable interrupts in arch_cpu_idle() on mips to repair the issue. Reported-and-tested-by: Jonas Gorski Reported-by: EunBong Song Booze-recommended-by: Ralf Baechle Signed-off-by: Thomas Gleixner Index: linux-2.6/arch/mips/kernel/process.c =================================================================== --- linux-2.6.orig/arch/mips/kernel/process.c +++ linux-2.6/arch/mips/kernel/process.c @@ -50,13 +50,18 @@ void arch_cpu_idle_dead(void) } #endif -void arch_cpu_idle(void) +static void smtc_idle_hook(void) { #ifdef CONFIG_MIPS_MT_SMTC extern void smtc_idle_loop_hook(void); - smtc_idle_loop_hook(); #endif +} + +void arch_cpu_idle(void) +{ + local_irq_enable(); + smtc_idle_hook(); if (cpu_wait) (*cpu_wait)(); else -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/