提交 2645e721 编写于 作者: D Daniel Hellstrom 提交者: David S. Miller

sparc32,leon: SMP power down implementation

Signed-off-by: NDaniel Hellstrom <daniel@gaisler.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5149bed8
...@@ -128,8 +128,16 @@ void cpu_idle(void) ...@@ -128,8 +128,16 @@ void cpu_idle(void)
set_thread_flag(TIF_POLLING_NRFLAG); set_thread_flag(TIF_POLLING_NRFLAG);
/* endless idle loop with no priority at all */ /* endless idle loop with no priority at all */
while(1) { while(1) {
while (!need_resched()) #ifdef CONFIG_SPARC_LEON
cpu_relax(); if (pm_idle) {
while (!need_resched())
(*pm_idle)();
} else
#endif
{
while (!need_resched())
cpu_relax();
}
preempt_enable_no_resched(); preempt_enable_no_resched();
schedule(); schedule();
preempt_disable(); preempt_disable();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册