Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1640349 > unrolled thread

[PATCH] powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1

Started by"Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
First post2017-05-12 11:30 +0200
Last post2017-05-17 11:40 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1 "Gautham R. Shenoy" <ego@linux.vnet.ibm.com> - 2017-05-12 11:30 +0200
    Re: [PATCH] powernv:idle: Set NAPSTATELOST after recovering paca on  P9 DD1 Nicholas Piggin <npiggin@gmail.com> - 2017-05-12 11:50 +0200
    Re: powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1 Michael Ellerman <patch-notifications@ellerman.id.au> - 2017-05-17 11:40 +0200

#1640349 — [PATCH] powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1

From"Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
Date2017-05-12 11:30 +0200
Subject[PATCH] powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1
Message-ID<tGf3A-2n7-9@gated-at.bofh.it>
From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>

commit 17ed4c8f81da ("powerpc/powernv: Recover correct PACA on wakeup
from a stop on P9 DD1") promises to set the NAPSTATELOST bit in paca
after recovering the correct paca for the thread waking up from stop1
on DD1, so that the GPRs can be correctly restored on the stop exit
path. However, it loads the value 1 into r3, but stores the value in
r0 into NAPSTATELOST(r13).

Fix this by correctly set the NAPSTATELOST bit in paca after
recovering the paca on POWER9 DD1.

Fixes: commit 17ed4c8f81da ("powerpc/powernv: Recover correct PACA on wakeup
from a stop on P9 DD1")

Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/idle_book3s.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S
index 07d4e0a..4898d67 100644
--- a/arch/powerpc/kernel/idle_book3s.S
+++ b/arch/powerpc/kernel/idle_book3s.S
@@ -416,7 +416,7 @@ power9_dd1_recover_paca:
 	 * which needs to be restored from the stack.
 	 */
 	li	r3, 1
-	stb	r0,PACA_NAPSTATELOST(r13)
+	stb	r3,PACA_NAPSTATELOST(r13)
 	blr
 
 /*
-- 
1.9.4

[toc] | [next] | [standalone]


#1640363 — Re: [PATCH] powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1

FromNicholas Piggin <npiggin@gmail.com>
Date2017-05-12 11:50 +0200
SubjectRe: [PATCH] powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1
Message-ID<tGfmV-2vB-3@gated-at.bofh.it>
In reply to#1640349
On Fri, 12 May 2017 14:52:06 +0530
"Gautham R. Shenoy" <ego@linux.vnet.ibm.com> wrote:

> From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
> 
> commit 17ed4c8f81da ("powerpc/powernv: Recover correct PACA on wakeup
> from a stop on P9 DD1") promises to set the NAPSTATELOST bit in paca
> after recovering the correct paca for the thread waking up from stop1
> on DD1, so that the GPRs can be correctly restored on the stop exit
> path. However, it loads the value 1 into r3, but stores the value in
> r0 into NAPSTATELOST(r13).
> 
> Fix this by correctly set the NAPSTATELOST bit in paca after
> recovering the paca on POWER9 DD1.
> 
> Fixes: commit 17ed4c8f81da ("powerpc/powernv: Recover correct PACA on wakeup
> from a stop on P9 DD1")
> 
> Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>

This looks obviously correct to me.

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>

> ---
>  arch/powerpc/kernel/idle_book3s.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S
> index 07d4e0a..4898d67 100644
> --- a/arch/powerpc/kernel/idle_book3s.S
> +++ b/arch/powerpc/kernel/idle_book3s.S
> @@ -416,7 +416,7 @@ power9_dd1_recover_paca:
>  	 * which needs to be restored from the stack.
>  	 */
>  	li	r3, 1
> -	stb	r0,PACA_NAPSTATELOST(r13)
> +	stb	r3,PACA_NAPSTATELOST(r13)
>  	blr
>  
>  /*

[toc] | [prev] | [next] | [standalone]


#1643175 — Re: powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1

FromMichael Ellerman <patch-notifications@ellerman.id.au>
Date2017-05-17 11:40 +0200
SubjectRe: powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1
Message-ID<tI3AZ-1j2-1@gated-at.bofh.it>
In reply to#1640349
On Fri, 2017-05-12 at 09:22:06 UTC, "Gautham R. Shenoy" wrote:
> From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
> 
> commit 17ed4c8f81da ("powerpc/powernv: Recover correct PACA on wakeup
> from a stop on P9 DD1") promises to set the NAPSTATELOST bit in paca
> after recovering the correct paca for the thread waking up from stop1
> on DD1, so that the GPRs can be correctly restored on the stop exit
> path. However, it loads the value 1 into r3, but stores the value in
> r0 into NAPSTATELOST(r13).
> 
> Fix this by correctly set the NAPSTATELOST bit in paca after
> recovering the paca on POWER9 DD1.
> 
> Fixes: commit 17ed4c8f81da ("powerpc/powernv: Recover correct PACA on wakeup
> from a stop on P9 DD1")
> 
> Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> Reviewed-by: Nicholas Piggin <npiggin@gmail.com>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/bbb075ddf7d58762040ca413ad82e9

cheers

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web