vserver 1.9.5.x5
[linux-2.6.git] / arch / ppc64 / kernel / mpic.c
index e013e85..593ea5b 100644 (file)
@@ -42,7 +42,7 @@
 
 static struct mpic *mpics;
 static struct mpic *mpic_primary;
-static spinlock_t mpic_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(mpic_lock);
 
 
 /*
@@ -765,10 +765,8 @@ void mpic_setup_this_cpu(void)
 #ifdef CONFIG_SMP
        struct mpic *mpic = mpic_primary;
        unsigned long flags;
-#ifdef CONFIG_IRQ_ALL_CPUS
        u32 msk = 1 << hard_smp_processor_id();
        unsigned int i;
-#endif
 
        BUG_ON(mpic == NULL);
 
@@ -776,16 +774,16 @@ void mpic_setup_this_cpu(void)
 
        spin_lock_irqsave(&mpic_lock, flags);
 
-#ifdef CONFIG_IRQ_ALL_CPUS
        /* let the mpic know we want intrs. default affinity is 0xffffffff
         * until changed via /proc. That's how it's done on x86. If we want
         * it differently, then we should make sure we also change the default
         * values of irq_affinity in irq.c.
         */
-       for (i = 0; i < mpic->num_sources ; i++)
-               mpic_irq_write(i, MPIC_IRQ_DESTINATION,
-                       mpic_irq_read(i, MPIC_IRQ_DESTINATION) | msk);
-#endif /* CONFIG_IRQ_ALL_CPUS */
+       if (distribute_irqs) {
+               for (i = 0; i < mpic->num_sources ; i++)
+                       mpic_irq_write(i, MPIC_IRQ_DESTINATION,
+                               mpic_irq_read(i, MPIC_IRQ_DESTINATION) | msk);
+       }
 
        /* Set current processor priority to 0 */
        mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0);