diff options
author | Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> | 2014-07-29 10:53:30 +0530 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-07-30 10:56:17 +1000 |
commit | d5aed5be5a63f991b80458b3a8eedaa26e203639 (patch) | |
tree | d8a0629f9e3419478acbcb204fe2a49bce96221f /include | |
parent | a02875504d6c182ec27fd29638f0451bfa13b969 (diff) | |
download | skiboot-d5aed5be5a63f991b80458b3a8eedaa26e203639.zip skiboot-d5aed5be5a63f991b80458b3a8eedaa26e203639.tar.gz skiboot-d5aed5be5a63f991b80458b3a8eedaa26e203639.tar.bz2 |
sleep: Add workarounds for fast sleep
Add OPAL calls to setup xscom before and after sleep
V1:https://w3-01.ibm.com/stg/linux/ltc/mailinglists/pipermail/sapphire/2014-July/003170.html
Changes in V2:
1.Store L2 Fir Action register contents in primary thread's pointer
2.Enable secondary threads also to call opal, now that the synchronization
across threads of a core will be taken care of by the kernel. We can
hence safely call fastsleep in smt on mode.
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/cpu.h | 1 | ||||
-rw-r--r-- | include/opal.h | 3 | ||||
-rw-r--r-- | include/xscom.h | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/include/cpu.h b/include/cpu.h index 7ea88b6..d7f6aae 100644 --- a/include/cpu.h +++ b/include/cpu.h @@ -57,6 +57,7 @@ struct cpu_thread { uint32_t con_suspend; bool con_need_flush; uint32_t hbrt_spec_wakeup; /* primary only */ + uint64_t save_l2_fir_action1; struct lock job_lock; struct list_head job_queue; diff --git a/include/opal.h b/include/opal.h index c8a3b5f..fe7d14e 100644 --- a/include/opal.h +++ b/include/opal.h @@ -134,7 +134,8 @@ #define OPAL_PCI_ERR_INJCT 96 #define OPAL_PCI_EEH_FREEZE_SET 97 #define OPAL_HANDLE_HMI 98 -#define OPAL_LAST 98 +#define OPAL_CONFIG_CPU_IDLE_STATE 99 +#define OPAL_LAST 99 #ifndef __ASSEMBLY__ diff --git a/include/xscom.h b/include/xscom.h index 2b09a86..66587e5 100644 --- a/include/xscom.h +++ b/include/xscom.h @@ -120,6 +120,7 @@ /* Per core power mgt registers */ #define PM_OHA_MODE_REG 0x1002000D +#define L2_FIR_ACTION1 0x10012807 /* EX slave per-core power mgt slave regisers */ #define EX_PM_GP0 0x0100 |