linux-mips
[Top] [All Lists]

Re: [PATCH] MIPS: Enable interrupts before WAIT instruction.

To: Aaro Koskinen <aaro.koskinen@iki.fi>
Subject: Re: [PATCH] MIPS: Enable interrupts before WAIT instruction.
From: David Daney <ddaney@caviumnetworks.com>
Date: Wed, 22 May 2013 15:36:51 -0700
Cc: David Daney <ddaney.cavm@gmail.com>, <linux-mips@linux-mips.org>, <ralf@linux-mips.org>, Linus Torvalds <torvalds@linux-foundation.org>, <linux-kernel@vger.kernel.org>, David Daney <david.daney@cavium.com>, Thomas Gleixner <tglx@linutronix.de>, Jonas Gorski <jogo@openwrt.org>
In-reply-to: <20130522223225.GH31836@blackmetal.musicnaut.iki.fi>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <CA+55aFwDGyHOzu=Qh7SJOBK6QvAwAh7pMDL6LfMUE=AW_kapAw@mail.gmail.com> <1367527692-25809-1-git-send-email-ddaney.cavm@gmail.com> <20130522223225.GH31836@blackmetal.musicnaut.iki.fi>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4
On 05/22/2013 03:32 PM, Aaro Koskinen wrote:
Hi,

On Thu, May 02, 2013 at 01:48:12PM -0700, David Daney wrote:
From: David Daney <david.daney@cavium.com>

As noted by Thomas Gleixner:

    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.

Instead of enabling interrupts in arch_cpu_idle() as Thomas' initial
patch does, we follow Linus' suggestion of doing it in the assembly
code to prevent the compiler from rearranging things.

Signed-off-by: David Daney <david.daney@cavium.com>
Reported-by: EunBong Song <eunb.song@samsung.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jonas Gorski <jogo@openwrt.org>
---

This is only very lightly tested, we need more testing before
declaring it the definitive fix.

I wonder what is the status of this patch? Or is there some alternative
fix?

I have Octeon+ board that hangs during 3.10-rc2 boot in spawn_ksoftirqd()
without this. Also, this patch does not apply cleanly to 3.10-rc2
anymore...

A.


Ralf has an alternate fix here:

http://git.linux-mips.org/pub/scm/ralf/upstream-linus.git

If all goes well, it will be merged soon.

David Daney




<Prev in Thread] Current Thread [Next in Thread>