]> err.no Git - linux-2.6/blobdiff - arch/mips/kernel/smp.c
[MIPS] R4700: Fix build_tlb_probe_entry
[linux-2.6] / arch / mips / kernel / smp.c
index 9d41dab90a809732e1c2eab6ed234e989d5637cd..63370cdd3c90f83f4ed04fcb926148fa8f4d061f 100644 (file)
@@ -35,6 +35,7 @@
 #include <asm/atomic.h>
 #include <asm/cpu.h>
 #include <asm/processor.h>
+#include <asm/r4k-timer.h>
 #include <asm/system.h>
 #include <asm/mmu_context.h>
 #include <asm/time.h>
@@ -86,8 +87,8 @@ struct plat_smp_ops *mp_ops;
 
 __cpuinit void register_smp_ops(struct plat_smp_ops *ops)
 {
-       if (ops)
-               printk(KERN_WARNING "Overriding previous set SMP ops\n");
+       if (mp_ops)
+               printk(KERN_WARNING "Overriding previously set SMP ops\n");
 
        mp_ops = ops;
 }
@@ -125,6 +126,8 @@ asmlinkage __cpuinit void start_secondary(void)
 
        cpu_set(cpu, cpu_callin_map);
 
+       synchronise_count_slave();
+
        cpu_idle();
 }
 
@@ -287,6 +290,7 @@ void smp_send_stop(void)
 void __init smp_cpus_done(unsigned int max_cpus)
 {
        mp_ops->cpus_done();
+       synchronise_count_master();
 }
 
 /* called from main before smp_init() */