[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.02.1305021527010.3972@ionos>
Date: Thu, 2 May 2013 16:33:52 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Linus Torvalds <torvalds@...ux-foundation.org>
cc: Jonas Gorski <jogo@...nwrt.org>, eunb.song@...sung.com,
"ralf@...ux-mips.org" <ralf@...ux-mips.org>,
"linux-mips@...ux-mips.org" <linux-mips@...ux-mips.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] MIPS: Enable interrupts in arch_cpu_idle()
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 <jogo@...nwrt.org>
Reported-by: EunBong Song <eunb.song@...sung.com>
Booze-recommended-by: Ralf Baechle <ralf@...ux-mips.org>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists