Merge branch 'linus' into irq/numa
[sfrench/cifs-2.6.git] / arch / mips / sibyte / sb1250 / irq.c
index c08ff582da6f05144535cf3c04615ab640b5e805..409dec798863194f364eb378666c9e7471fd0227 100644 (file)
@@ -50,7 +50,7 @@ static void enable_sb1250_irq(unsigned int irq);
 static void disable_sb1250_irq(unsigned int irq);
 static void ack_sb1250_irq(unsigned int irq);
 #ifdef CONFIG_SMP
-static void sb1250_set_affinity(unsigned int irq, const struct cpumask *mask);
+static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask);
 #endif
 
 #ifdef CONFIG_SIBYTE_HAS_LDT
@@ -103,26 +103,24 @@ void sb1250_unmask_irq(int cpu, int irq)
 }
 
 #ifdef CONFIG_SMP
-static void sb1250_set_affinity(unsigned int irq, const struct cpumask *mask)
+static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask)
 {
        int i = 0, old_cpu, cpu, int_on;
        u64 cur_ints;
-       struct irq_desc *desc = irq_desc + irq;
        unsigned long flags;
 
        i = cpumask_first(mask);
 
        if (cpumask_weight(mask) > 1) {
                printk("attempted to set irq affinity for irq %d to multiple CPUs\n", irq);
-               return;
+               return -1;
        }
 
        /* Convert logical CPU to physical CPU */
        cpu = cpu_logical_map(i);
 
        /* Protect against other affinity changers and IMR manipulation */
-       spin_lock_irqsave(&desc->lock, flags);
-       spin_lock(&sb1250_imr_lock);
+       spin_lock_irqsave(&sb1250_imr_lock, flags);
 
        /* Swizzle each CPU's IMR (but leave the IP selection alone) */
        old_cpu = sb1250_irq_owner[irq];
@@ -144,8 +142,9 @@ static void sb1250_set_affinity(unsigned int irq, const struct cpumask *mask)
                ____raw_writeq(cur_ints, IOADDR(A_IMR_MAPPER(cpu) +
                                        R_IMR_INTERRUPT_MASK));
        }
-       spin_unlock(&sb1250_imr_lock);
-       spin_unlock_irqrestore(&desc->lock, flags);
+       spin_unlock_irqrestore(&sb1250_imr_lock, flags);
+
+       return 0;
 }
 #endif