aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/irq.c')
-rw-r--r--arch/powerpc/kernel/irq.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 64f6f2031c22..250ee2ebf288 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -290,30 +290,33 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
290} 290}
291 291
292#ifdef CONFIG_HOTPLUG_CPU 292#ifdef CONFIG_HOTPLUG_CPU
293void fixup_irqs(cpumask_t map) 293void fixup_irqs(const struct cpumask *map)
294{ 294{
295 struct irq_desc *desc; 295 struct irq_desc *desc;
296 unsigned int irq; 296 unsigned int irq;
297 static int warned; 297 static int warned;
298 cpumask_var_t mask;
298 299
299 for_each_irq(irq) { 300 alloc_cpumask_var(&mask, GFP_KERNEL);
300 cpumask_t mask;
301 301
302 for_each_irq(irq) {
302 desc = irq_to_desc(irq); 303 desc = irq_to_desc(irq);
303 if (desc && desc->status & IRQ_PER_CPU) 304 if (desc && desc->status & IRQ_PER_CPU)
304 continue; 305 continue;
305 306
306 cpumask_and(&mask, desc->affinity, &map); 307 cpumask_and(mask, desc->affinity, map);
307 if (any_online_cpu(mask) == NR_CPUS) { 308 if (cpumask_any(mask) >= nr_cpu_ids) {
308 printk("Breaking affinity for irq %i\n", irq); 309 printk("Breaking affinity for irq %i\n", irq);
309 mask = map; 310 cpumask_copy(mask, map);
310 } 311 }
311 if (desc->chip->set_affinity) 312 if (desc->chip->set_affinity)
312 desc->chip->set_affinity(irq, &mask); 313 desc->chip->set_affinity(irq, mask);
313 else if (desc->action && !(warned++)) 314 else if (desc->action && !(warned++))
314 printk("Cannot set affinity for irq %i\n", irq); 315 printk("Cannot set affinity for irq %i\n", irq);
315 } 316 }
316 317
318 free_cpumask_var(mask);
319
317 local_irq_enable(); 320 local_irq_enable();
318 mdelay(1); 321 mdelay(1);
319 local_irq_disable(); 322 local_irq_disable();