diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2011-04-25 21:48:17 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-16 13:03:28 -0700 |
commit | 2645e7219e88d1e2ab8b2939537bce36e6db9e8c (patch) | |
tree | 545461772c912730ba345ada0078fca7561e1a2e /arch/sparc/kernel | |
parent | 5149bed8912f4030f52feb33326cfe794831b184 (diff) |
sparc32,leon: SMP power down implementation
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/process_32.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c index 17529298c50..c8cc461ff75 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(); |