Browse Source

[MIPS] BCM1480: Fix setting of irq affinity.

Signed-off-by: Mark Mason <mason@broadcom.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Mark Mason 18 years ago
parent
commit
6c9fde4bff
1 changed files with 2 additions and 2 deletions
  1. 2 2
      arch/mips/sibyte/bcm1480/irq.c

+ 2 - 2
arch/mips/sibyte/bcm1480/irq.c

@@ -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);