diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-05-22 15:53:01 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-06-06 20:49:06 +1000 |
commit | db9c1422002c1333fd09177d32edb8c2003fb4ea (patch) | |
tree | 5f6e4186e87b1c7927a1d9d915e59529c3929c19 /include/cpu.h | |
parent | 38b0c8454b56a74fe785f0db1d218afa8f6ea478 (diff) | |
download | talos-skiboot-db9c1422002c1333fd09177d32edb8c2003fb4ea.tar.gz talos-skiboot-db9c1422002c1333fd09177d32edb8c2003fb4ea.zip |
Improve cpu_idle when PM is disabled
Split cpu_idle() into cpu_idle_delay() and cpu_idle_job() rather than
requesting the idle type as a function argument. Have those functions
provide a default polling (non-PM) implentation which spin at the
lowest SMT priority.
This moves all the decrementer delay code into the CPU idle code rather
than the caller.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/cpu.h')
-rw-r--r-- | include/cpu.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/include/cpu.h b/include/cpu.h index 938492e3..2d696994 100644 --- a/include/cpu.h +++ b/include/cpu.h @@ -43,11 +43,6 @@ enum cpu_thread_state { struct cpu_job; struct xive_cpu_state; -enum cpu_wake_cause { - cpu_wake_on_job, - cpu_wake_on_dec, -}; - struct cpu_thread { uint32_t pir; uint32_t server_no; @@ -274,6 +269,7 @@ static inline void cpu_give_self_os(void) extern unsigned long __attrconst cpu_stack_bottom(unsigned int pir); extern unsigned long __attrconst cpu_stack_top(unsigned int pir); -extern void cpu_idle(enum cpu_wake_cause wake_on); +extern void cpu_idle_job(void); +extern void cpu_idle_delay(unsigned long delay, unsigned long min_pm); #endif /* __CPU_H */ |