diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-13 05:50:26 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-13 05:50:26 -0500 |
commit | 0de26520c7cabf36e1de090ea8092f011a6106ce (patch) | |
tree | 3d02e509b6315fdfd9cdb8c9e0b9ed0a30cf9384 /arch/arm | |
parent | 29c0177e6a4ac094302bed54a1d4bbb6b740a9ef (diff) |
cpumask: make irq_set_affinity() take a const struct cpumask
Impact: change existing irq_chip API
Not much point with gentle transition here: the struct irq_chip's
setaffinity method signature needs to change.
Fortunately, not widely used code, but hits a few architectures.
Note: In irq_select_affinity() I save a temporary in by mangling
irq_desc[irq].affinity directly. Ingo, does this break anything?
(Folded in fix from KOSAKI Motohiro)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Grant Grundler <grundler@parisc-linux.org>
Acked-by: Ingo Molnar <mingo@redhat.com>
Cc: ralf@linux-mips.org
Cc: grundler@parisc-linux.org
Cc: jeremy@xensource.com
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/common/gic.c | 4 | ||||
-rw-r--r-- | arch/arm/kernel/irq.c | 2 | ||||
-rw-r--r-- | arch/arm/oprofile/op_model_mpcore.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 7fc9860a97d7..c6884ba1d5ed 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -109,11 +109,11 @@ static void gic_unmask_irq(unsigned int irq) | |||
109 | } | 109 | } |
110 | 110 | ||
111 | #ifdef CONFIG_SMP | 111 | #ifdef CONFIG_SMP |
112 | static void gic_set_cpu(unsigned int irq, cpumask_t mask_val) | 112 | static void gic_set_cpu(unsigned int irq, const struct cpumask *mask_val) |
113 | { | 113 | { |
114 | void __iomem *reg = gic_dist_base(irq) + GIC_DIST_TARGET + (gic_irq(irq) & ~3); | 114 | void __iomem *reg = gic_dist_base(irq) + GIC_DIST_TARGET + (gic_irq(irq) & ~3); |
115 | unsigned int shift = (irq % 4) * 8; | 115 | unsigned int shift = (irq % 4) * 8; |
116 | unsigned int cpu = first_cpu(mask_val); | 116 | unsigned int cpu = cpumask_first(mask_val); |
117 | u32 val; | 117 | u32 val; |
118 | 118 | ||
119 | spin_lock(&irq_controller_lock); | 119 | spin_lock(&irq_controller_lock); |
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 2f3eb795fa6e..7141cee1fab7 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -174,7 +174,7 @@ static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu) | |||
174 | pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->cpu, cpu); | 174 | pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->cpu, cpu); |
175 | 175 | ||
176 | spin_lock_irq(&desc->lock); | 176 | spin_lock_irq(&desc->lock); |
177 | desc->chip->set_affinity(irq, cpumask_of_cpu(cpu)); | 177 | desc->chip->set_affinity(irq, cpumask_of(cpu)); |
178 | spin_unlock_irq(&desc->lock); | 178 | spin_unlock_irq(&desc->lock); |
179 | } | 179 | } |
180 | 180 | ||
diff --git a/arch/arm/oprofile/op_model_mpcore.c b/arch/arm/oprofile/op_model_mpcore.c index 4de366e8b4c5..6d6bd5899240 100644 --- a/arch/arm/oprofile/op_model_mpcore.c +++ b/arch/arm/oprofile/op_model_mpcore.c | |||
@@ -260,10 +260,10 @@ static void em_stop(void) | |||
260 | static void em_route_irq(int irq, unsigned int cpu) | 260 | static void em_route_irq(int irq, unsigned int cpu) |
261 | { | 261 | { |
262 | struct irq_desc *desc = irq_desc + irq; | 262 | struct irq_desc *desc = irq_desc + irq; |
263 | cpumask_t mask = cpumask_of_cpu(cpu); | 263 | const struct cpumask *mask = cpumask_of(cpu); |
264 | 264 | ||
265 | spin_lock_irq(&desc->lock); | 265 | spin_lock_irq(&desc->lock); |
266 | desc->affinity = mask; | 266 | desc->affinity = *mask; |
267 | desc->chip->set_affinity(irq, mask); | 267 | desc->chip->set_affinity(irq, mask); |
268 | spin_unlock_irq(&desc->lock); | 268 | spin_unlock_irq(&desc->lock); |
269 | } | 269 | } |