irq: update all arches for new irq_desc
[linux-2.6.git] / arch / powerpc / sysdev / mpic.c
index 1890fb0..0afd21f 100644 (file)
@@ -566,9 +566,10 @@ static void __init mpic_scan_ht_pics(struct mpic *mpic)
 #ifdef CONFIG_SMP
 static int irq_choose_cpu(unsigned int virt_irq)
 {
-       cpumask_t mask = irq_desc[virt_irq].affinity;
+       cpumask_t mask;
        int cpuid;
 
+       cpumask_copy(&mask, irq_desc[virt_irq].affinity);
        if (cpus_equal(mask, CPU_MASK_ALL)) {
                static int irq_rover;
                static DEFINE_SPINLOCK(irq_rover_lock);
@@ -661,17 +662,6 @@ static inline void mpic_eoi(struct mpic *mpic)
        (void)mpic_cpu_read(MPIC_INFO(CPU_WHOAMI));
 }
 
-#ifdef CONFIG_SMP
-static irqreturn_t mpic_ipi_action(int irq, void *data)
-{
-       long ipi = (long)data;
-
-       smp_message_recv(ipi);
-
-       return IRQ_HANDLED;
-}
-#endif /* CONFIG_SMP */
-
 /*
  * Linux descriptor level callbacks
  */
@@ -817,7 +807,7 @@ static void mpic_end_ipi(unsigned int irq)
 
 #endif /* CONFIG_SMP */
 
-void mpic_set_affinity(unsigned int irq, cpumask_t cpumask)
+void mpic_set_affinity(unsigned int irq, const struct cpumask *cpumask)
 {
        struct mpic *mpic = mpic_from_irq(irq);
        unsigned int src = mpic_irq_to_hw(irq);
@@ -829,7 +819,7 @@ void mpic_set_affinity(unsigned int irq, cpumask_t cpumask)
        } else {
                cpumask_t tmp;
 
-               cpus_and(tmp, cpumask, cpu_online_map);
+               cpumask_and(&tmp, cpumask, cpu_online_mask);
 
                mpic_irq_write(src, MPIC_INFO(IRQ_DESTINATION),
                               mpic_physmask(cpus_addr(tmp)[0]));
@@ -1548,13 +1538,7 @@ unsigned int mpic_get_mcirq(void)
 void mpic_request_ipis(void)
 {
        struct mpic *mpic = mpic_primary;
-       long i, err;
-       static char *ipi_names[] = {
-               "IPI0 (call function)",
-               "IPI1 (reschedule)",
-               "IPI2 (call function single)",
-               "IPI3 (debugger break)",
-       };
+       int i;
        BUG_ON(mpic == NULL);
 
        printk(KERN_INFO "mpic: requesting IPIs ... \n");
@@ -1563,17 +1547,10 @@ void mpic_request_ipis(void)
                unsigned int vipi = irq_create_mapping(mpic->irqhost,
                                                       mpic->ipi_vecs[0] + i);
                if (vipi == NO_IRQ) {
-                       printk(KERN_ERR "Failed to map IPI %ld\n", i);
-                       break;
-               }
-               err = request_irq(vipi, mpic_ipi_action,
-                                 IRQF_DISABLED|IRQF_PERCPU,
-                                 ipi_names[i], (void *)i);
-               if (err) {
-                       printk(KERN_ERR "Request of irq %d for IPI %ld failed\n",
-                              vipi, i);
-                       break;
+                       printk(KERN_ERR "Failed to map %s\n", smp_ipi_name[i]);
+                       continue;
                }
+               smp_request_message_ipi(vipi, i);
        }
 }