From db9c1422002c1333fd09177d32edb8c2003fb4ea Mon Sep 17 00:00:00 2001 From: Nicholas Piggin Date: Mon, 22 May 2017 15:53:01 +1000 Subject: 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 Signed-off-by: Stewart Smith --- include/cpu.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'include/cpu.h') 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 */ -- cgit v1.2.1