diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-07-30 11:10:32 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-07-30 11:10:32 +1000 |
commit | 0768e820ed612d455a18cbe4bf5ef9f0ff0d65e0 (patch) | |
tree | bb716a36f0bc184521303d481b9feb64985ef642 /hw | |
parent | 5fba99ca7bb8178fc46f352eb1b1145d45a2e06c (diff) | |
download | blackbird-skiboot-0768e820ed612d455a18cbe4bf5ef9f0ff0d65e0.tar.gz blackbird-skiboot-0768e820ed612d455a18cbe4bf5ef9f0ff0d65e0.zip |
slw: Small cleanup of state definitions
Don't bother writing 0*constant for the non-relevant instruction
bits in the various states and keep the "normal" sleep case in
add_cpu_idle_state_properties() so we don't have to add it back
later when we have a CPU that doesn't require the workaround.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/slw.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -473,8 +473,6 @@ static struct cpu_idle_states power8_cpu_idle_states[] = { | 0*IDLE_LOSE_HYP_CONTEXT \ | 0*IDLE_LOSE_FULL_CONTEXT \ | 1*IDLE_USE_INST_NAP \ - | 0*IDLE_USE_INST_SLEEP \ - | 0*IDLE_USE_INST_WINKLE \ | 0*IDLE_USE_PMICR, .pmicr = 0, .pmicr_mask = 0 }, @@ -486,9 +484,7 @@ static struct cpu_idle_states power8_cpu_idle_states[] = { | 1*IDLE_LOSE_USER_CONTEXT \ | 0*IDLE_LOSE_HYP_CONTEXT \ | 0*IDLE_LOSE_FULL_CONTEXT \ - | 0*IDLE_USE_INST_NAP \ | 1*IDLE_USE_INST_SLEEP_ER1 \ - | 0*IDLE_USE_INST_WINKLE \ | 0*IDLE_USE_PMICR, /* Not enabled until deep states are available */ .pmicr = IDLE_FASTSLEEP_PMICR, @@ -501,8 +497,6 @@ static struct cpu_idle_states power8_cpu_idle_states[] = { | 1*IDLE_LOSE_USER_CONTEXT \ | 1*IDLE_LOSE_HYP_CONTEXT \ | 1*IDLE_LOSE_FULL_CONTEXT \ - | 0*IDLE_USE_INST_NAP \ - | 0*IDLE_USE_INST_SLEEP \ | 1*IDLE_USE_INST_WINKLE \ | 0*IDLE_USE_PMICR, /* Currently choosing deep vs fast via EX_PM_GP1 reg */ @@ -595,6 +589,7 @@ void add_cpu_idle_state_properties(void) for (i = 0; i < nr_states; i++) { /* For each state, check if it is one of the supported states. */ if( (states[i].flags & IDLE_USE_INST_NAP) || + ((states[i].flags & IDLE_USE_INST_SLEEP) && can_sleep) || ((states[i].flags & IDLE_USE_INST_SLEEP_ER1) && can_sleep) || ((states[i].flags & IDLE_USE_INST_WINKLE) && can_winkle) ) { /* |