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-23 18:47:26 +0100
commit34726ba5d543ef7f1bb234c751bd318190397f28 (patch)
treeaa7a245b75240e394eb0e52e78cb87af2c3b950f /include
parentfa28a10c946c33de8c240c3412675f7c5a68335d (diff)
downloadskiboot-34726ba5d543ef7f1bb234c751bd318190397f28.zip
skiboot-34726ba5d543ef7f1bb234c751bd318190397f28.tar.gz
skiboot-34726ba5d543ef7f1bb234c751bd318190397f28.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;