* [PATCH] powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1
@ 2017-05-12 9:22 Gautham R. Shenoy
2017-05-12 9:35 ` Nicholas Piggin
2017-05-17 9:34 ` Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Gautham R. Shenoy @ 2017-05-12 9:22 UTC (permalink / raw)
To: Nicholas Piggin, Michael Ellerman, Michael Neuling,
Vaidyanathan Srinivasan, Shilpasri G Bhat, Akshay Adiga
Cc: linuxppc-dev, linux-kernel, Gautham R. Shenoy
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1
2017-05-12 9:22 [PATCH] powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1 Gautham R. Shenoy
@ 2017-05-12 9:35 ` Nicholas Piggin
2017-05-17 9:34 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Nicholas Piggin @ 2017-05-12 9:35 UTC (permalink / raw)
To: Gautham R. Shenoy
Cc: Michael Ellerman, Michael Neuling, Vaidyanathan Srinivasan,
Shilpasri G Bhat, Akshay Adiga, linuxppc-dev, linux-kernel
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
>
> /*
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1
2017-05-12 9:22 [PATCH] powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1 Gautham R. Shenoy
2017-05-12 9:35 ` Nicholas Piggin
@ 2017-05-17 9:34 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2017-05-17 9:34 UTC (permalink / raw)
To: Gautham R. Shenoy, Nicholas Piggin, Michael Neuling,
Vaidyanathan Srinivasan, Shilpasri G Bhat, Akshay Adiga
Cc: Gautham R. Shenoy, linuxppc-dev, linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-17 9:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-12 9:22 [PATCH] powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1 Gautham R. Shenoy
2017-05-12 9:35 ` Nicholas Piggin
2017-05-17 9:34 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).