[MIPS] BCM1480: Fix setting of irq affinity.
authorMark Mason <mmason@upwardaccess.com>
Mon, 26 Mar 2007 20:28:26 +0000 (13:28 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 29 Mar 2007 22:46:36 +0000 (23:46 +0100)
Signed-off-by: Mark Mason <mason@broadcom.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/sibyte/bcm1480/irq.c

index 20af0f1bb7bf9b8af97d0e486b67cc76892c8d0d..ba0c4b776c85b73736df70505facc9e8e0eb1193 100644 (file)
@@ -141,11 +141,11 @@ static void bcm1480_set_affinity(unsigned int irq, cpumask_t mask)
        unsigned long flags;
        unsigned int irq_dirty;
 
-       i = first_cpu(mask);
-       if (next_cpu(i, mask) <= NR_CPUS) {
+       if (cpus_weight(mask) != 1) {
                printk("attempted to set irq affinity for irq %d to multiple CPUs\n", irq);
                return;
        }
+       i = first_cpu(mask);
 
        /* Convert logical CPU to physical CPU */
        cpu = cpu_logical_map(i);