Commit 942d042d authored by Andrew Isaacson's avatar Andrew Isaacson Committed by Ralf Baechle

Use cpumask_t rather than hand-rolled bitmask code in sb1250_set_affinity.

Signed-Off-By: default avatarAndrew Isaacson <adi@broadcom.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent f5cfa980
...@@ -53,7 +53,7 @@ static void disable_sb1250_irq(unsigned int irq); ...@@ -53,7 +53,7 @@ static void disable_sb1250_irq(unsigned int irq);
static unsigned int startup_sb1250_irq(unsigned int irq); static unsigned int startup_sb1250_irq(unsigned int irq);
static void ack_sb1250_irq(unsigned int irq); static void ack_sb1250_irq(unsigned int irq);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
static void sb1250_set_affinity(unsigned int irq, unsigned long mask); static void sb1250_set_affinity(unsigned int irq, cpumask_t mask);
#endif #endif
#ifdef CONFIG_SIBYTE_HAS_LDT #ifdef CONFIG_SIBYTE_HAS_LDT
...@@ -117,23 +117,16 @@ void sb1250_unmask_irq(int cpu, int irq) ...@@ -117,23 +117,16 @@ void sb1250_unmask_irq(int cpu, int irq)
} }
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
static void sb1250_set_affinity(unsigned int irq, unsigned long mask) static void sb1250_set_affinity(unsigned int irq, cpumask_t mask)
{ {
int i = 0, old_cpu, cpu, int_on; int i = 0, old_cpu, cpu, int_on;
u64 cur_ints; u64 cur_ints;
irq_desc_t *desc = irq_desc + irq; irq_desc_t *desc = irq_desc + irq;
unsigned long flags; unsigned long flags;
while (mask) { i = first_cpu(mask);
if (mask & 1) {
mask >>= 1;
break;
}
mask >>= 1;
i++;
}
if (mask) { if (cpus_weight(mask) > 1) {
printk("attempted to set irq affinity for irq %d to multiple CPUs\n", irq); printk("attempted to set irq affinity for irq %d to multiple CPUs\n", irq);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment