Skip to contentSkip to conversation

powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1

PATCH Applied Gautham R. Shenoy 3 participants 3 messages May 12, 2017 – May 17, 2017 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1

From: "Gautham R. Shenoy" <[email protected]>

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")

---
 arch/powerpc/kernel/idle_book3s.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/idle_book3s.S +1 -1
index 07d4e0a..4898d67 100644
@@ -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
 
 /*
Signature · 1 line
1.9.4
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · On Fri, 12 May 2017 14:52:06 +0530 "Gautham R. Shenoy"…

From: "Gautham R. Shenoy" <[email protected]>

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).

Quoted 7 lines

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")

This looks obviously correct to me.

Quoted 17 lines
---
 arch/powerpc/kernel/idle_book3s.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/idle_book3s.S +1 -1
index 07d4e0a..4898d67 100644
@@ -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
 
 /*
#2 lore raw
In reply to Gautham R. Shenoy
Quoted 9 lines · Gautham R. Shenoy

From: "Gautham R. Shenoy" <[email protected]>

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).

Quoted 8 lines

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")

Applied to powerpc fixes, thanks.

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

cheers