diff options
Diffstat (limited to 'arch/ppc/kernel')
-rw-r--r-- | arch/ppc/kernel/idle.c | 4 | ||||
-rw-r--r-- | arch/ppc/kernel/smp.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/ppc/kernel/idle.c b/arch/ppc/kernel/idle.c index 821a75e..1be3ca5 100644 --- a/arch/ppc/kernel/idle.c +++ b/arch/ppc/kernel/idle.c @@ -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); } diff --git a/arch/ppc/kernel/smp.c b/arch/ppc/kernel/smp.c index 43b8fc2..becbfa3 100644 --- a/arch/ppc/kernel/smp.c +++ b/arch/ppc/kernel/smp.c @@ -301,6 +301,10 @@ void __init smp_prepare_cpus(unsigned int max_cpus) /* Probe platform for CPUs: always linear. */ num_cpus = smp_ops->probe(); + + if (num_cpus < 2) + smp_tb_synchronized = 1; + for (i = 0; i < num_cpus; ++i) cpu_set(i, cpu_possible_map); |