mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
cpuidle: stop depending on pm_idle
cpuidle users should call cpuidle_call_idle() directly rather than via (pm_idle)() function pointer. Architecture may choose to continue using (pm_idle)(), but cpuidle need not depend on it: my_arch_cpu_idle() ... if(cpuidle_call_idle()) pm_idle(); cc: Kevin Hilman <[email protected]> cc: Paul Mundt <[email protected]> cc: [email protected] Acked-by: H. Peter Anvin <[email protected]> Signed-off-by: Len Brown <[email protected]>
This commit is contained in:
parent
4bfc8288bc
commit
a0bfa13738
6 changed files with 33 additions and 25 deletions
|
|
@ -16,12 +16,13 @@
|
|||
#include <linux/thread_info.h>
|
||||
#include <linux/irqflags.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/cpuidle.h>
|
||||
#include <asm/pgalloc.h>
|
||||
#include <asm/system.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/smp.h>
|
||||
|
||||
void (*pm_idle)(void) = NULL;
|
||||
static void (*pm_idle)(void);
|
||||
|
||||
static int hlt_counter;
|
||||
|
||||
|
|
@ -100,7 +101,8 @@ void cpu_idle(void)
|
|||
local_irq_disable();
|
||||
/* Don't trace irqs off for idle */
|
||||
stop_critical_timings();
|
||||
pm_idle();
|
||||
if (cpuidle_call_idle())
|
||||
pm_idle();
|
||||
/*
|
||||
* Sanity check to ensure that pm_idle() returns
|
||||
* with IRQs enabled
|
||||
|
|
|
|||
Loading…
Reference in a new issue