From: Daniel Hellstrom Date: Mon, 25 Apr 2011 21:48:17 +0000 (+0000) Subject: sparc32,leon: SMP power down implementation X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2645e7219e88d1e2ab8b2939537bce36e6db9e8c;p=linux-beck.git sparc32,leon: SMP power down implementation Signed-off-by: Daniel Hellstrom Signed-off-by: David S. Miller --- diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c index 17529298c50a..c8cc461ff75f 100644 --- a/arch/sparc/kernel/process_32.c +++ b/arch/sparc/kernel/process_32.c @@ -128,8 +128,16 @@ void cpu_idle(void) set_thread_flag(TIF_POLLING_NRFLAG); /* endless idle loop with no priority at all */ while(1) { - while (!need_resched()) - cpu_relax(); +#ifdef CONFIG_SPARC_LEON + if (pm_idle) { + while (!need_resched()) + (*pm_idle)(); + } else +#endif + { + while (!need_resched()) + cpu_relax(); + } preempt_enable_no_resched(); schedule(); preempt_disable();