提交 e13ac219 编写于 作者: O Otavio Salvador 提交者: Linus Torvalds

[PATCH] arch/ppc/kernel/idle.c: don't declare cpu variable in non-SMP kernels

Disable declaration of cpu variable in default_idle function when
building non-SMP kernels.
Signed-off-by: NOtavio Salvador <otavio@debian.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 fa57f9c2
......@@ -37,7 +37,6 @@
void default_idle(void)
{
void (*powersave)(void);
int cpu = smp_processor_id();
powersave = ppc_md.power_save;
......@@ -47,7 +46,8 @@ void default_idle(void)
#ifdef CONFIG_SMP
else {
set_thread_flag(TIF_POLLING_NRFLAG);
while (!need_resched() && !cpu_is_offline(cpu))
while (!need_resched() &&
!cpu_is_offline(smp_processor_id()))
barrier();
clear_thread_flag(TIF_POLLING_NRFLAG);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册