linux-mips
[Top] [All Lists]

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

To: Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] MIPS: Enable interrupts before WAIT instruction.
From: Jonas Gorski <jogo@openwrt.org>
Date: Fri, 3 May 2013 11:54:43 +0200
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>
In-reply-to: <alpine.LFD.2.02.1305022303510.2891@ionos>
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> <alpine.LFD.2.02.1305022303510.2891@ionos>
Sender: linux-mips-bounce@linux-mips.org
On Thu, May 2, 2013 at 11:04 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
>
>
> On Thu, 2 May 2013, 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.
>
> Yeah, that looks way more sane.

In a first quick test I can also confirm that it seems to work (as an
alternative to the other fix).


Jonas

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