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

From: Michael Neuling
Date: Tue Nov 22 2016 - 19:33:01 EST


On Tue, 2016-11-22 at 23:36 +0530, Gautham R. Shenoy wrote:
> From: "Gautham R. Shenoy" <ego@xxxxxxxxxxxxxxxxxx>
>
> 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 <ego@xxxxxxxxxxxxxxxxxx>

Tested here on my configuration... FWIW

Acked-By: Michael Neuling <mikey@xxxxxxxxxxx>

> ---
> Â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