Patchwork powerpc/powernv: Check for IRQHAPPENED before sleeping

login
register
mail settings
Submitter Preeti U Murthy
Date June 30, 2014, 6:24 a.m.
Message ID <20140630062404.29315.23382.stgit@preeti.in.ibm.com>
Download mbox | patch
Permalink /patch/365488/
State Superseded
Headers show

Comments

Preeti U Murthy - June 30, 2014, 6:24 a.m.
Commit 8d6f7c5a: "powerpc/powernv: Make it possible to skip the IRQHAPPENED
check in power7_nap()" added code that prevents even cores which enter sleep
on idle, from checking for pending interrupts. Fix this.

Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
---

 arch/powerpc/kernel/idle_power7.S |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Michael Neuling - June 30, 2014, 2:01 p.m.
On Mon, 2014-06-30 at 11:54 +0530, Preeti U Murthy wrote:
> Commit 8d6f7c5a: "powerpc/powernv: Make it possible to skip the IRQHAPPENED
> check in power7_nap()" added code that prevents even cores which enter sleep
> on idle, from checking for pending interrupts. Fix this.
> 
> Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>

Acked-by: Michael Neuling <mikey@neuling.org>

> ---
> 
>  arch/powerpc/kernel/idle_power7.S |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S
> index 2480256..5cf3d36 100644
> --- a/arch/powerpc/kernel/idle_power7.S
> +++ b/arch/powerpc/kernel/idle_power7.S
> @@ -131,7 +131,7 @@ _GLOBAL(power7_nap)
>  
>  _GLOBAL(power7_sleep)
>  	li	r3,1
> -	li	r4,0
> +	li	r4,1
>  	b	power7_powersave_common
>  	/* No return */
>  
>
Michael Ellerman - July 1, 2014, 12:52 a.m.
On Mon, 2014-06-30 at 11:54 +0530, Preeti U Murthy wrote:
> Commit 8d6f7c5a: "powerpc/powernv: Make it possible to skip the IRQHAPPENED
> check in power7_nap()" added code that prevents even cores which enter sleep
> on idle, from checking for pending interrupts. Fix this.

To be clear, it is a bug in the original commit. Mikey and I pair programmed
that code, and he was *definitely* typing at that point ;)

Can you please include in the changelog what the symptom of the bug is, and
have you seen it in practice?

The bad commit went into 3.16-rc1, so we don't need to backport this to any
stable release.

cheers

> diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S
> index 2480256..5cf3d36 100644
> --- a/arch/powerpc/kernel/idle_power7.S
> +++ b/arch/powerpc/kernel/idle_power7.S
> @@ -131,7 +131,7 @@ _GLOBAL(power7_nap)
>  
>  _GLOBAL(power7_sleep)
>  	li	r3,1
> -	li	r4,0
> +	li	r4,1
>  	b	power7_powersave_common
>  	/* No return */
>  
>
Michael Neuling - July 1, 2014, 3:15 a.m.
On Tue, 2014-07-01 at 10:52 +1000, Michael Ellerman wrote:
> On Mon, 2014-06-30 at 11:54 +0530, Preeti U Murthy wrote:
> > Commit 8d6f7c5a: "powerpc/powernv: Make it possible to skip the IRQHAPPENED
> > check in power7_nap()" added code that prevents even cores which enter sleep
> > on idle, from checking for pending interrupts. Fix this.
> 
> To be clear, it is a bug in the original commit. Mikey and I pair programmed
> that code, and he was *definitely* typing at that point ;)

It's always nice to know that in battle a comrade will throw himself on
a grenade to save you. :-P

Actually, I'm pretty sure this happened when you were away (probably on
a beach somewhere), I was forward porting the patch set, hit a conflict
and fucked it up.  

Mikey

> 
> Can you please include in the changelog what the symptom of the bug is, and
> have you seen it in practice?
> 
> The bad commit went into 3.16-rc1, so we don't need to backport this to any
> stable release.
> 
> cheers
> 
> > diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S
> > index 2480256..5cf3d36 100644
> > --- a/arch/powerpc/kernel/idle_power7.S
> > +++ b/arch/powerpc/kernel/idle_power7.S
> > @@ -131,7 +131,7 @@ _GLOBAL(power7_nap)
> >  
> >  _GLOBAL(power7_sleep)
> >  	li	r3,1
> > -	li	r4,0
> > +	li	r4,1
> >  	b	power7_powersave_common
> >  	/* No return */
> >  
> > 
> 
> 
> 
> 
>

Patch

diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S
index 2480256..5cf3d36 100644
--- a/arch/powerpc/kernel/idle_power7.S
+++ b/arch/powerpc/kernel/idle_power7.S
@@ -131,7 +131,7 @@  _GLOBAL(power7_nap)
 
 _GLOBAL(power7_sleep)
 	li	r3,1
-	li	r4,0
+	li	r4,1
 	b	power7_powersave_common
 	/* No return */