diff options
author | Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> | 2016-09-27 23:35:35 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-12-13 17:56:16 +1100 |
commit | 739063fb706f987df2a766a981abc75053244044 (patch) | |
tree | 4d117b8168ea8ceba424ad91ce4b45ef61002e53 /include | |
parent | b7b5302af73764c659346ba90f4933bf4502b64a (diff) | |
download | skiboot-739063fb706f987df2a766a981abc75053244044.zip skiboot-739063fb706f987df2a766a981abc75053244044.tar.gz skiboot-739063fb706f987df2a766a981abc75053244044.tar.bz2 |
slw: Set PSSCR value for idle states
PSSCR(Processor Stop Status and Control Register) is an SPR whose
contents control the operation of stop instruction. Currently in DT,
the value of PSSCR only included RL(Requested Level) for each idle
state. This patch adds MTL(Maximum Transistion Level), TR(Transistion
Rate), ESL(Enable State Loss) and EC(Exit Criterion) bits for idle
state in the PSSCR configuration. It also adds new idle states
stop0_lite, stop1_lite and stop2_lite which are no state loss versions
of stop0, stop1 and stop2 respectively. The lite variant has EC and
ESL bits of PSSCR set to 0. The thread entering a lite variant of stop
state will not lose any state and will wakeup at next instruction
following stop if MSR.EE=0 or at the corresponding interrupt handler
if MSR.EE=1. This will reduce the exit latency of the idle state and
hardware will not allocate the thread resources to other threads while
in power saving mode.
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/opal-api.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/opal-api.h b/include/opal-api.h index 05ff51d..36471ae 100644 --- a/include/opal-api.h +++ b/include/opal-api.h @@ -209,6 +209,21 @@ #define OPAL_PM_DEEPWINKLE_PMICR 0x0000000000300000UL #define OPAL_PM_WINKLE_PMICR_MASK 0x0000000000300000UL +#define OPAL_PM_PSSCR_RL_MASK 0x000000000000000FUL +#define OPAL_PM_PSSCR_MTL_MASK 0x00000000000000F0UL +#define OPAL_PM_PSSCR_TR_MASK 0x0000000000000300UL +#define OPAL_PM_PSSCR_ESL PPC_BIT(42) +#define OPAL_PM_PSSCR_EC PPC_BIT(43) + +#define OPAL_PM_PSSCR_MASK OPAL_PM_PSSCR_RL_MASK | \ + OPAL_PM_PSSCR_MTL_MASK | \ + OPAL_PM_PSSCR_TR_MASK | \ + OPAL_PM_PSSCR_ESL | \ + OPAL_PM_PSSCR_EC + +#define OPAL_PM_PSSCR_RL(l) (l) +#define OPAL_PM_PSSCR_MTL(l) ((l) << 4) +#define OPAL_PM_PSSCR_TR(l) ((l) << 8) /* * Flags for stop states. Use 2 bits to distinguish between |