Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / arch / mips / sibyte / cfe / smp.c
index 7339219..eab20e2 100644 (file)
@@ -31,7 +31,7 @@
  *
  * Common setup before any secondaries are started
  */
-void __init prom_prepare_cpus(unsigned int max_cpus)
+void __init plat_smp_setup(void)
 {
        int i, num;
 
@@ -40,14 +40,18 @@ void __init prom_prepare_cpus(unsigned int max_cpus)
        __cpu_number_map[0] = 0;
        __cpu_logical_map[0] = 0;
 
-       for (i=1, num=0; i<NR_CPUS; i++) {
+       for (i = 1, num = 0; i < NR_CPUS; i++) {
                if (cfe_cpu_stop(i) == 0) {
                        cpu_set(i, phys_cpu_present_map);
                        __cpu_number_map[i] = ++num;
                        __cpu_logical_map[num] = i;
                }
        }
-       printk("Detected %i available secondary CPU(s)\n", num);
+       printk(KERN_INFO "Detected %i available secondary CPU(s)\n", num);
+}
+
+void __init plat_prepare_cpus(unsigned int max_cpus)
+{
 }
 
 /*
@@ -57,10 +61,10 @@ void __init prom_prepare_cpus(unsigned int max_cpus)
 void prom_boot_secondary(int cpu, struct task_struct *idle)
 {
        int retval;
-       
+
        retval = cfe_cpu_start(cpu_logical_map(cpu), &smp_bootstrap,
                               __KSTK_TOS(idle),
-                              (unsigned long)idle->thread_info, 0);
+                              (unsigned long)task_thread_info(idle), 0);
        if (retval != 0)
                printk("cfe_start_cpu(%i) returned %i\n" , cpu, retval);
 }
@@ -70,8 +74,15 @@ void prom_boot_secondary(int cpu, struct task_struct *idle)
  */
 void prom_init_secondary(void)
 {
+#if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80)
+       extern void bcm1480_smp_init(void);
+       bcm1480_smp_init();
+#elif defined(CONFIG_SIBYTE_SB1250)
        extern void sb1250_smp_init(void);
        sb1250_smp_init();
+#else
+#error invalid SMP configuration
+#endif
 }
 
 /*
@@ -80,8 +91,15 @@ void prom_init_secondary(void)
  */
 void prom_smp_finish(void)
 {
+#if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80)
+       extern void bcm1480_smp_finish(void);
+       bcm1480_smp_finish();
+#elif defined(CONFIG_SIBYTE_SB1250)
        extern void sb1250_smp_finish(void);
        sb1250_smp_finish();
+#else
+#error invalid SMP configuration
+#endif
 }
 
 /*