Skip to content

Commit

Permalink
[PATCH] arch/ppc/kernel/idle.c: don't declare cpu variable in non-SMP…
Browse files Browse the repository at this point in the history
… kernels

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>
  • Loading branch information
Otavio Salvador authored and Linus Torvalds committed Jan 6, 2006
1 parent fa57f9c commit e13ac21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/ppc/kernel/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
void default_idle(void)
{
void (*powersave)(void);
int cpu = smp_processor_id();

powersave = ppc_md.power_save;

Expand All @@ -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);
}
Expand Down

0 comments on commit e13ac21

Please sign in to comment.