[Skiboot] [PATCH 1/3] idle: user context state loss flags fix for stop states
Akshay Adiga
akshay.adiga at linux.vnet.ibm.com
Fri Sep 1 20:34:51 AEST 2017
On 08/30/2017 11:50 AM, Nicholas Piggin wrote:
> The "lite" stop variants with PSSCR[ESL]=PSSCR[EC]=1 do not lose user
> context, while the non-lite variants do (ESL: enable state loss).
>
> Some of the POWER9 idle states had these wrong.
>
> These are not used by Linux yet.
Thanks Nick for correcting. The patch looks good.
It's good to have this patch, in case someone uses this flag in the future.
Reviewed-by: Akshay Adiga <akshay.adiga at linux.vnet.ibm.com>
>
> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
> ---
> hw/slw.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/hw/slw.c b/hw/slw.c
> index 98040e6e..0720545c 100644
> --- a/hw/slw.c
> +++ b/hw/slw.c
> @@ -526,7 +526,7 @@ static struct cpu_idle_states power9_cpu_idle_states[] = {
> .residency_ns = 20000,
> .flags = 0*OPAL_PM_DEC_STOP \
> | 0*OPAL_PM_TIMEBASE_STOP \
> - | 0*OPAL_PM_LOSE_USER_CONTEXT \
> + | 1*OPAL_PM_LOSE_USER_CONTEXT \
> | 0*OPAL_PM_LOSE_HYP_CONTEXT \
> | 0*OPAL_PM_LOSE_FULL_CONTEXT \
> | 1*OPAL_PM_STOP_INST_FAST,
> @@ -542,7 +542,7 @@ static struct cpu_idle_states power9_cpu_idle_states[] = {
> .residency_ns = 49000,
> .flags = 0*OPAL_PM_DEC_STOP \
> | 0*OPAL_PM_TIMEBASE_STOP \
> - | 1*OPAL_PM_LOSE_USER_CONTEXT \
> + | 0*OPAL_PM_LOSE_USER_CONTEXT \
> | 0*OPAL_PM_LOSE_HYP_CONTEXT \
> | 0*OPAL_PM_LOSE_FULL_CONTEXT \
> | 1*OPAL_PM_STOP_INST_FAST,
> @@ -572,7 +572,7 @@ static struct cpu_idle_states power9_cpu_idle_states[] = {
> .residency_ns = 99000,
> .flags = 0*OPAL_PM_DEC_STOP \
> | 0*OPAL_PM_TIMEBASE_STOP \
> - | 1*OPAL_PM_LOSE_USER_CONTEXT \
> + | 0*OPAL_PM_LOSE_USER_CONTEXT \
> | 0*OPAL_PM_LOSE_HYP_CONTEXT \
> | 0*OPAL_PM_LOSE_FULL_CONTEXT \
> | 1*OPAL_PM_STOP_INST_FAST,
> @@ -671,7 +671,7 @@ static struct cpu_idle_states power9_ndd1_cpu_idle_states[] = {
> .residency_ns = 49000,
> .flags = 0*OPAL_PM_DEC_STOP \
> | 0*OPAL_PM_TIMEBASE_STOP \
> - | 1*OPAL_PM_LOSE_USER_CONTEXT \
> + | 0*OPAL_PM_LOSE_USER_CONTEXT \
> | 0*OPAL_PM_LOSE_HYP_CONTEXT \
> | 0*OPAL_PM_LOSE_FULL_CONTEXT \
> | 1*OPAL_PM_STOP_INST_FAST,
>
More information about the Skiboot
mailing list