From c20bfe4a751f43793daaa426c68402f00affbb78 Mon Sep 17 00:00:00 2001 From: Andrew Isaacson Date: Wed, 22 Jun 2005 16:01:09 -0700 Subject: [PATCH] --- yaml --- r: 11245 b: refs/heads/master c: 942d042d17c77febab9af6815b2e77f665d0f9c1 h: refs/heads/master i: 11243: c19422647332a0b5d0a0a10c20fd4f13dfe96df5 v: v3 --- [refs] | 2 +- trunk/arch/mips/sibyte/sb1250/irq.c | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index a4bb4264950f..a516c06545dd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f5cfa980e535e1f77038f8037422594592208695 +refs/heads/master: 942d042d17c77febab9af6815b2e77f665d0f9c1 diff --git a/trunk/arch/mips/sibyte/sb1250/irq.c b/trunk/arch/mips/sibyte/sb1250/irq.c index b9f1ff420fef..589537bfcc3d 100644 --- a/trunk/arch/mips/sibyte/sb1250/irq.c +++ b/trunk/arch/mips/sibyte/sb1250/irq.c @@ -53,7 +53,7 @@ static void disable_sb1250_irq(unsigned int irq); static unsigned int startup_sb1250_irq(unsigned int irq); static void ack_sb1250_irq(unsigned int irq); #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 #ifdef CONFIG_SIBYTE_HAS_LDT @@ -117,23 +117,16 @@ void sb1250_unmask_irq(int cpu, int irq) } #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; u64 cur_ints; irq_desc_t *desc = irq_desc + irq; unsigned long flags; - while (mask) { - if (mask & 1) { - mask >>= 1; - break; - } - mask >>= 1; - i++; - } + i = first_cpu(mask); - if (mask) { + if (cpus_weight(mask) > 1) { printk("attempted to set irq affinity for irq %d to multiple CPUs\n", irq); return; }