diff options
| -rw-r--r-- | arch/sh/kernel/irq.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index 995301afa36d..68ecbe6c881a 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
| @@ -296,13 +296,16 @@ int __init arch_probe_nr_irqs(void) | |||
| 296 | #endif | 296 | #endif |
| 297 | 297 | ||
| 298 | #ifdef CONFIG_HOTPLUG_CPU | 298 | #ifdef CONFIG_HOTPLUG_CPU |
| 299 | static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu) | 299 | static void route_irq(struct irq_data *data, unsigned int irq, unsigned int cpu) |
| 300 | { | 300 | { |
| 301 | struct irq_desc *desc = irq_to_desc(irq); | ||
| 302 | struct irq_chip *chip = irq_data_get_irq_chip(data); | ||
| 303 | |||
| 301 | printk(KERN_INFO "IRQ%u: moving from cpu%u to cpu%u\n", | 304 | printk(KERN_INFO "IRQ%u: moving from cpu%u to cpu%u\n", |
| 302 | irq, desc->node, cpu); | 305 | irq, data->node, cpu); |
| 303 | 306 | ||
| 304 | raw_spin_lock_irq(&desc->lock); | 307 | raw_spin_lock_irq(&desc->lock); |
| 305 | desc->chip->set_affinity(irq, cpumask_of(cpu)); | 308 | chip->irq_set_affinity(data, cpumask_of(cpu), false); |
| 306 | raw_spin_unlock_irq(&desc->lock); | 309 | raw_spin_unlock_irq(&desc->lock); |
| 307 | } | 310 | } |
| 308 | 311 | ||
| @@ -313,24 +316,25 @@ static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu) | |||
| 313 | */ | 316 | */ |
| 314 | void migrate_irqs(void) | 317 | void migrate_irqs(void) |
| 315 | { | 318 | { |
| 316 | struct irq_desc *desc; | ||
| 317 | unsigned int irq, cpu = smp_processor_id(); | 319 | unsigned int irq, cpu = smp_processor_id(); |
| 318 | 320 | ||
| 319 | for_each_irq_desc(irq, desc) { | 321 | for_each_active_irq(irq) { |
| 320 | if (desc->node == cpu) { | 322 | struct irq_data *data = irq_get_irq_data(irq); |
| 321 | unsigned int newcpu = cpumask_any_and(desc->affinity, | 323 | |
| 324 | if (data->node == cpu) { | ||
| 325 | unsigned int newcpu = cpumask_any_and(data->affinity, | ||
| 322 | cpu_online_mask); | 326 | cpu_online_mask); |
| 323 | if (newcpu >= nr_cpu_ids) { | 327 | if (newcpu >= nr_cpu_ids) { |
| 324 | if (printk_ratelimit()) | 328 | if (printk_ratelimit()) |
| 325 | printk(KERN_INFO "IRQ%u no longer affine to CPU%u\n", | 329 | printk(KERN_INFO "IRQ%u no longer affine to CPU%u\n", |
| 326 | irq, cpu); | 330 | irq, cpu); |
| 327 | 331 | ||
| 328 | cpumask_setall(desc->affinity); | 332 | cpumask_setall(data->affinity); |
| 329 | newcpu = cpumask_any_and(desc->affinity, | 333 | newcpu = cpumask_any_and(data->affinity, |
| 330 | cpu_online_mask); | 334 | cpu_online_mask); |
| 331 | } | 335 | } |
| 332 | 336 | ||
| 333 | route_irq(desc, irq, newcpu); | 337 | route_irq(data, irq, newcpu); |
| 334 | } | 338 | } |
| 335 | } | 339 | } |
| 336 | } | 340 | } |
