Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jonas Gorski <jogo@openwrt.org>,
	eunb.song@samsung.com,
	"ralf@linux-mips.org" <ralf@linux-mips.org>,
	"linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] MIPS: Enable interrupts in arch_cpu_idle()
Date: Thu, 2 May 2013 16:33:52 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.02.1305021527010.3972@ionos> (raw)
In-Reply-To: <CAOiHx=mA-htk_2daeE9WpbEVV9YLvfLc1NYZZR=JeDdibchCnw@mail.gmail.com>

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@openwrt.org>
Reported-by: EunBong Song <eunb.song@samsung.com>
Booze-recommended-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.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

  reply	other threads:[~2013-05-02 14:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-01  4:57 mips; boot fail after merge 3.9+ EUNBONG SONG
2013-05-02  8:32 ` Jonas Gorski
2013-05-02 10:42   ` Thomas Gleixner
2013-05-02 11:20     ` Jonas Gorski
2013-05-02 14:33       ` Thomas Gleixner [this message]
2013-05-02 14:58         ` [PATCH] MIPS: Enable interrupts in arch_cpu_idle() Ralf Baechle
2013-05-02 16:45           ` Linus Torvalds
2013-05-02 20:48             ` [PATCH] MIPS: Enable interrupts before WAIT instruction David Daney
2013-05-02 21:04               ` Thomas Gleixner
2013-05-03  9:54                 ` Jonas Gorski
2013-05-06 14:26               ` Manuel Lauss
2013-05-07  5:47                 ` Eunbong Song
2013-05-22 22:32               ` Aaro Koskinen
2013-05-22 22:36                 ` David Daney
2013-05-22 22:36                   ` David Daney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.02.1305021527010.3972@ionos \
    --to=tglx@linutronix.de \
    --cc=eunb.song@samsung.com \
    --cc=jogo@openwrt.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox