[PATCH] arch/ppc/kernel/idle.c: don't declare cpu variable in non-SMP kernels
authorOtavio Salvador <otavio@debian.org>
Fri, 6 Jan 2006 08:11:26 +0000 (00:11 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 6 Jan 2006 16:33:30 +0000 (08:33 -0800)
Disable declaration of cpu variable in default_idle function when
building non-SMP kernels.

Signed-off-by: Otavio Salvador <otavio@debian.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc/kernel/idle.c

index 821a75e45602b9c42abd3de2f0d1949cb7f0f48e..1be3ca5bae4009026616423ef88dc623eccfce57 100644 (file)
@@ -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);
                }