aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-07-24 09:27:23 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-08-22 15:26:52 +1000
commit9567e18728d0559bc5f79ea927d684dc3b1e3555 (patch)
tree17dc839a890c54fd9d437321ab4756585e8e72c4 /include
parent514406fa44279996bfc9c85c1e4e53689d375e64 (diff)
downloadskiboot-9567e18728d0559bc5f79ea927d684dc3b1e3555.zip
skiboot-9567e18728d0559bc5f79ea927d684dc3b1e3555.tar.gz
skiboot-9567e18728d0559bc5f79ea927d684dc3b1e3555.tar.bz2
cpu: Add support for nap mode on P8
This allows us to send threads to nap mode when either idle (waiting for a job) or when in a sleep delay (time_wait*). We only enable the functionality after the 0x100 vector has been patched, and we disable it before transferring control to Linux. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/cpu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/cpu.h b/include/cpu.h
index 4164151..341e73d 100644
--- a/include/cpu.h
+++ b/include/cpu.h
@@ -66,6 +66,8 @@ struct cpu_thread {
bool in_mcount;
bool in_poller;
bool in_reinit;
+ bool in_sleep;
+ bool in_idle;
uint32_t hbrt_spec_wakeup; /* primary only */
uint64_t save_l2_fir_action1;
uint64_t current_token;
@@ -251,6 +253,8 @@ extern void cpu_process_jobs(void);
extern void cpu_process_local_jobs(void);
/* Check if there's any job pending */
bool cpu_check_jobs(struct cpu_thread *cpu);
+/* Enable/disable PM */
+void cpu_set_pm_enable(bool pm_enabled);
static inline void cpu_give_self_os(void)
{