[Top] [All Lists]

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

To: Aaro Koskinen <>
Subject: Re: [PATCH] MIPS: Enable interrupts before WAIT instruction.
From: David Daney <>
Date: Wed, 22 May 2013 15:36:51 -0700
Cc: David Daney <>, <>, <>, Linus Torvalds <>, <>, David Daney <>, Thomas Gleixner <>, Jonas Gorski <>
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
Original-recipient: rfc822;
References: <> <> <>
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:

On Thu, May 02, 2013 at 01:48:12PM -0700, David Daney wrote:
From: David Daney <>

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 <>
Reported-by: EunBong Song <>
Cc: Thomas Gleixner <>
Cc: Jonas Gorski <>

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

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


Ralf has an alternate fix here:

If all goes well, it will be merged soon.

David Daney

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