[PATCH] powernv: Clear SPRN_PSSCR when a POWER9 CPU comes online

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE3597d

5 messages, 4 authors, 2016-11-28 · open the first message on its own page

[PATCH] powernv: Clear SPRN_PSSCR when a POWER9 CPU comes online

From: Gautham R. Shenoy <hidden>
Date: 2016-11-22 18:06:54

From: "Gautham R. Shenoy" <redacted>

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

Signed-off-by: Gautham R. Shenoy <redacted>
---
 arch/powerpc/kernel/cpu_setup_power.S | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kernel/cpu_setup_power.S b/arch/powerpc/kernel/cpu_setup_power.S
index 52ff3f0..37ad045 100644
--- a/arch/powerpc/kernel/cpu_setup_power.S
+++ b/arch/powerpc/kernel/cpu_setup_power.S
@@ -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
-- 
1.9.4

Re: [PATCH] powernv: Clear SPRN_PSSCR when a POWER9 CPU comes online

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-11-22 23:30:45

"Gautham R. Shenoy" [off-list ref] writes:
From: "Gautham R. Shenoy" <redacted>

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

Re: [PATCH] powernv: Clear SPRN_PSSCR when a POWER9 CPU comes online

From: Michael Neuling <hidden>
Date: 2016-11-22 23:35:41

On Wed, 2016-11-23 at 10:30 +1100, Michael Ellerman wrote:
"Gautham R. Shenoy" [off-list ref] writes:
=20
quoted
From: "Gautham R. Shenoy" <redacted>
=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

Re: [PATCH] powernv: Clear SPRN_PSSCR when a POWER9 CPU comes online

From: Michael Neuling <hidden>
Date: 2016-11-23 00:32:58

On Tue, 2016-11-22 at 23:36 +0530, Gautham R. Shenoy wrote:
From: "Gautham R. Shenoy" <redacted>
=20
Ensure that PSSCR is set to a safe value corresponding to no
state-loss each time a POWER9 CPU comes online.
=20
Signed-off-by: Gautham R. Shenoy <redacted>
Tested here on my configuration... FWIW

Acked-By: Michael Neuling <redacted>
quoted hunk
---
=C2=A0arch/powerpc/kernel/cpu_setup_power.S | 2 ++
=C2=A01 file changed, 2 insertions(+)
=20
diff --git a/arch/powerpc/kernel/cpu_setup_power.S
b/arch/powerpc/kernel/cpu_setup_power.S
index 52ff3f0..37ad045 100644
--- a/arch/powerpc/kernel/cpu_setup_power.S
+++ b/arch/powerpc/kernel/cpu_setup_power.S
@@ -96,6 +96,7 @@ _GLOBAL(__setup_cpu_power9)
=C2=A0	mtlr	r11
=C2=A0	beqlr
=C2=A0	li	r0,0
+	mtspr	SPRN_PSSCR,r0
=C2=A0	mtspr	SPRN_LPID,r0
=C2=A0	mfspr	r3,SPRN_LPCR
=C2=A0	ori	r3, r3, LPCR_PECEDH
@@ -116,6 +117,7 @@ _GLOBAL(__restore_cpu_power9)
=C2=A0	mtlr	r11
=C2=A0	beqlr
=C2=A0	li	r0,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

Re: powernv: Clear SPRN_PSSCR when a POWER9 CPU comes online

From: Michael Ellerman <hidden>
Date: 2016-11-28 12:15:36

On Tue, 2016-11-22 at 18:06:40 UTC, "Gautham R. Shenoy" wrote:
From: "Gautham R. Shenoy" <redacted>

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

Signed-off-by: Gautham R. Shenoy <redacted>
Acked-By: Michael Neuling <redacted>
Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/378f96d3cd442d5cb8e2692d8767a4

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help