diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-07-22 15:09:22 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-07-22 15:09:22 +1000 |
commit | 5ac6ac391d3c8113705be7e66f6f88d487884d97 (patch) | |
tree | df896a0b02d4cde4d2e217d545cd347a80c35b89 /hw/slw.c | |
parent | a4202bc19821a024e460592159507a059f993d3b (diff) | |
download | skiboot-5ac6ac391d3c8113705be7e66f6f88d487884d97.zip skiboot-5ac6ac391d3c8113705be7e66f6f88d487884d97.tar.gz skiboot-5ac6ac391d3c8113705be7e66f6f88d487884d97.tar.bz2 |
slw: Change bit used to expose sleep support
Due to an errata in P8, we cannot let the OS use the sleep instruction
without some extra workarounds in the OS. So let's use a different bit
to represent that support so that existing OSes without the workaround
don't enable support for sleep mode.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'hw/slw.c')
-rw-r--r-- | hw/slw.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -428,8 +428,9 @@ struct cpu_idle_states { #define IDLE_LOSE_FULL_CONTEXT 0x00000400 /* Restore hypervisor resource by searching PACA */ #define IDLE_USE_INST_NAP 0x00010000 /* Use nap instruction */ -#define IDLE_USE_INST_SLEEP 0x00020000 /* Use sleep instruction */ +#define IDLE_USE_INST_SLEEP 0x00020000 /* Use sleep instruction (no workaround) */ #define IDLE_USE_INST_WINKLE 0x00040000 /* Use winkle instruction */ +#define IDLE_USE_INST_SLEEP_ER1 0x00080000 /* Use sleep instruction (need workaround)*/ #define IDLE_USE_PMICR 0x00800000 /* Use SPR PMICR instruction */ #define IDLE_FASTSLEEP_PMICR 0x0000002000000000 @@ -472,8 +473,8 @@ static struct cpu_idle_states power8_cpu_idle_states[] = { | 0*IDLE_USE_PMICR, .pmicr = 0, .pmicr_mask = 0 }, - { /* fast sleep */ - .name = "fastsleep", + { /* fast sleep (with workaround) */ + .name = "fastsleep_", .latency_ns = 100000, .flags = 1*IDLE_DEC_STOP \ | 1*IDLE_TB_STOP \ @@ -481,7 +482,7 @@ static struct cpu_idle_states power8_cpu_idle_states[] = { | 0*IDLE_LOSE_HYP_CONTEXT \ | 0*IDLE_LOSE_FULL_CONTEXT \ | 0*IDLE_USE_INST_NAP \ - | 1*IDLE_USE_INST_SLEEP \ + | 1*IDLE_USE_INST_SLEEP_ER1 \ | 0*IDLE_USE_INST_WINKLE \ | 0*IDLE_USE_PMICR, /* Not enabled until deep states are available */ |