aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2021-12-17 12:17:23 +1000
committerCédric Le Goater <clg@kaod.org>2021-12-17 10:34:23 +0100
commitd30c3d885581a0a07080b5a7af10eff8b13e0643 (patch)
tree8918e02996e539c95eb137e0ac39e17c3f7d3fa8 /include
parent9cf2093c9d4a57d658df32577cb801e7056ae937 (diff)
downloadskiboot-d30c3d885581a0a07080b5a7af10eff8b13e0643.zip
skiboot-d30c3d885581a0a07080b5a7af10eff8b13e0643.tar.gz
skiboot-d30c3d885581a0a07080b5a7af10eff8b13e0643.tar.bz2
core/cpu: make cpu idle states simpler
Rework the CPU idle state code: * in_idle is true for any kind of idle including spinning. This is not used anywhere except for state assertions for now. * in_sleep is true for idle that requires an IPI to wake up. * in_job_sleep is true for in_sleep idle which is also cpu_wake_on_job. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'include')
-rw-r--r--include/cpu.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/cpu.h b/include/cpu.h
index b0c78ce..d0fc6cc 100644
--- a/include/cpu.h
+++ b/include/cpu.h
@@ -60,8 +60,9 @@ struct cpu_thread {
bool in_poller;
bool in_reinit;
bool in_fast_sleep;
- bool in_sleep;
- bool in_idle;
+ bool in_idle; /* any idle state, even busy wait */
+ bool in_sleep; /* idle which requires IPI */
+ bool in_job_sleep; /* requires IPI and cpu_wake_on_job */
uint32_t hbrt_spec_wakeup; /* primary only */
uint64_t save_l2_fir_action1;
uint64_t current_token;