]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/sgi-ip27/ip27-smp.c
Pull bugzilla-5653 into release branch
[linux-2.6-omap-h63xx.git] / arch / mips / sgi-ip27 / ip27-smp.c
index 243f2ab458934aba97360eac2ce789c341298574..09fa7f5216f0f294217e368fcb6e7f0dc91e3d6e 100644 (file)
@@ -127,32 +127,20 @@ void cpu_node_probe(void)
        printk("Discovered %d cpus on %d nodes\n", highest + 1, num_online_nodes());
 }
 
-static void intr_clear_bits(nasid_t nasid, volatile hubreg_t *pend,
-       int base_level)
+static __init void intr_clear_all(nasid_t nasid)
 {
-       volatile hubreg_t bits;
        int i;
 
-       /* Check pending interrupts */
-       if ((bits = HUB_L(pend)) != 0)
-               for (i = 0; i < N_INTPEND_BITS; i++)
-                       if (bits & (1 << i))
-                               LOCAL_HUB_CLR_INTR(base_level + i);
-}
-
-static void intr_clear_all(nasid_t nasid)
-{
        REMOTE_HUB_S(nasid, PI_INT_MASK0_A, 0);
        REMOTE_HUB_S(nasid, PI_INT_MASK0_B, 0);
        REMOTE_HUB_S(nasid, PI_INT_MASK1_A, 0);
        REMOTE_HUB_S(nasid, PI_INT_MASK1_B, 0);
-       intr_clear_bits(nasid, REMOTE_HUB_ADDR(nasid, PI_INT_PEND0),
-                       INT_PEND0_BASELVL);
-       intr_clear_bits(nasid, REMOTE_HUB_ADDR(nasid, PI_INT_PEND1),
-                       INT_PEND1_BASELVL);
+
+       for (i = 0; i < 128; i++)
+               REMOTE_HUB_CLR_INTR(nasid, i);
 }
 
-void __init prom_prepare_cpus(unsigned int max_cpus)
+void __init plat_smp_setup(void)
 {
        cnodeid_t       cnode;
 
@@ -173,6 +161,11 @@ void __init prom_prepare_cpus(unsigned int max_cpus)
        alloc_cpupda(0, 0);
 }
 
+void __init plat_prepare_cpus(unsigned int max_cpus)
+{
+       /* We already did everything necessary earlier */
+}
+
 /*
  * Launch a slave into smp_bootstrap().  It doesn't take an argument, and we
  * set sp to the kernel stack of the newly created idle process, gp to the proc
@@ -180,8 +173,8 @@ void __init prom_prepare_cpus(unsigned int max_cpus)
  */
 void __init prom_boot_secondary(int cpu, struct task_struct *idle)
 {
-       unsigned long gp = (unsigned long) idle->thread_info;
-       unsigned long sp = gp + THREAD_SIZE - 32;
+       unsigned long gp = (unsigned long)task_thread_info(idle);
+       unsigned long sp = __KSTK_TOS(idle);
 
        LAUNCH_SLAVE(cputonasid(cpu),cputoslice(cpu),
                (launch_proc_t)MAPPED_KERN_RW_TO_K0(smp_bootstrap),