Skip to contentSkip to conversation

powernv: Clear SPRN_PSSCR when a POWER9 CPU comes online

PATCH Applied Gautham R. Shenoy 4 participants 5 messages Nov 22, 2016 – Nov 28, 2016 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powernv: Clear SPRN_PSSCR when a POWER9 CPU comes online

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

Ensure that PSSCR is set to a safe value corresponding to no state-loss each time a POWER9 CPU comes online.

---
 arch/powerpc/kernel/cpu_setup_power.S | 2 ++
 1 file changed, 2 insertions(+)
arch/powerpc/kernel/cpu_setup_power.S +2 -0
index 52ff3f0..37ad045 100644
@@ -96,6 +96,7 @@ _GLOBAL(__setup_cpu_power9)
 	mtlr	r11
 	beqlr
 	li	r0,0
+	mtspr	SPRN_PSSCR,r0
 	mtspr	SPRN_LPID,r0
 	mfspr	r3,SPRN_LPCR
 	ori	r3, r3, LPCR_PECEDH
@@ -116,6 +117,7 @@ _GLOBAL(__restore_cpu_power9)
 	mtlr	r11
 	beqlr
 	li	r0,0
+	mtspr	SPRN_PSSCR,r0
 	mtspr	SPRN_LPID,r0
 	mfspr   r3,SPRN_LPCR
 	ori	r3, r3, LPCR_PECEDH
Signature · 1 line
1.9.4
#1 lore raw
Quoted 4 lines · Gautham R. Shenoy

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

Ensure that PSSCR is set to a safe value corresponding to no state-loss each time a POWER9 CPU comes online.

Is this a bug fix? I can't tell from the change log.

cheers

#2 lore raw
Quoted 8 lines · Michael Ellerman

"Gautham R. Shenoy" <[email protected]> writes:
=20

Quoted 4 lines

From: "Gautham R. Shenoy" <[email protected]> =20
Ensure that PSSCR is set to a safe value corresponding to no state-loss each time a POWER9 CPU comes online.

=20
Is this a bug fix? I can't tell from the change log.

There are no known bugs it's fixing. =C2=A0

It's just safer to run with a known default value, rather than what we rand= omly
inherit from previous firmware.

Mikey

Acked-by on v1 1/1
#3 lore raw
In reply to Gautham R. Shenoy
Quoted 6 lines · Gautham R. Shenoy

From: "Gautham R. Shenoy" <[email protected]> =20
Ensure that PSSCR is set to a safe value corresponding to no state-loss each time a POWER9 CPU comes online. =20

Tested here on my configuration... FWIW

Quoted 25 lines

---
=C2=A0arch/powerpc/kernel/cpu_setup_power.S | 2 ++ =C2=A01 file changed, 2 insertions(+)
=20

arch/powerpc/kernel/cpu_setup_power.S +0 -0
index 52ff3f0..37ad045 100644
@@ -96,6 +96,7 @@ _GLOBAL(__setup_cpu_power9)

=C2=A0 mtlr r11
=C2=A0 beqlr
=C2=A0 li r0,0

arch/powerpc/kernel/cpu_setup_power.S +1 -0
+	mtspr	SPRN_PSSCR,r0

=C2=A0 mtspr SPRN_LPID,r0
=C2=A0 mfspr r3,SPRN_LPCR
=C2=A0 ori r3, r3, LPCR_PECEDH

arch/powerpc/kernel/cpu_setup_power.S +0 -0
@@ -116,6 +117,7 @@ _GLOBAL(__restore_cpu_power9)

=C2=A0 mtlr r11
=C2=A0 beqlr
=C2=A0 li r0,0

arch/powerpc/kernel/cpu_setup_power.S +1 -0
+	mtspr	SPRN_PSSCR,r0

=C2=A0 mtspr SPRN_LPID,r0
=C2=A0 mfspr=C2=A0=C2=A0=C2=A0r3,SPRN_LPCR
=C2=A0 ori r3, r3, LPCR_PECEDH