From e65cecd718c6dcbfc95b447d2622c9011af3b487 Mon Sep 17 00:00:00 2001 From: Nicholas Piggin Date: Wed, 30 Aug 2017 16:20:09 +1000 Subject: idle: user context state loss flags fix for stop states 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. Signed-off-by: Nicholas Piggin Reviewed-by: Akshay Adiga Signed-off-by: Stewart Smith --- hw/slw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hw/slw.c') 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, -- cgit v1.2.1