diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2011-03-07 09:00:20 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-03-09 19:04:04 -0500 |
commit | e11802872db82417e51e1bbe0751dbb21842d713 (patch) | |
tree | 8f0610362a2671a367a6cf2288f3380a8097ab06 /arch/powerpc/kernel/irq.c | |
parent | 73909af7367a4daf2395846e776e0b326bd4e23b (diff) |
powerpc: core irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/irq.c')
-rw-r--r-- | arch/powerpc/kernel/irq.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 8a958ca26ac2..0a5570338b96 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -237,6 +237,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
237 | int i = *(loff_t *) v, j, prec; | 237 | int i = *(loff_t *) v, j, prec; |
238 | struct irqaction *action; | 238 | struct irqaction *action; |
239 | struct irq_desc *desc; | 239 | struct irq_desc *desc; |
240 | struct irq_chip *chip; | ||
240 | 241 | ||
241 | if (i > nr_irqs) | 242 | if (i > nr_irqs) |
242 | return 0; | 243 | return 0; |
@@ -270,8 +271,9 @@ int show_interrupts(struct seq_file *p, void *v) | |||
270 | for_each_online_cpu(j) | 271 | for_each_online_cpu(j) |
271 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); | 272 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); |
272 | 273 | ||
273 | if (desc->chip) | 274 | chip = get_irq_desc_chip(desc); |
274 | seq_printf(p, " %-16s", desc->chip->name); | 275 | if (chip) |
276 | seq_printf(p, " %-16s", chip->name); | ||
275 | else | 277 | else |
276 | seq_printf(p, " %-16s", "None"); | 278 | seq_printf(p, " %-16s", "None"); |
277 | seq_printf(p, " %-8s", (desc->status & IRQ_LEVEL) ? "Level" : "Edge"); | 279 | seq_printf(p, " %-8s", (desc->status & IRQ_LEVEL) ? "Level" : "Edge"); |
@@ -313,6 +315,8 @@ void fixup_irqs(const struct cpumask *map) | |||
313 | alloc_cpumask_var(&mask, GFP_KERNEL); | 315 | alloc_cpumask_var(&mask, GFP_KERNEL); |
314 | 316 | ||
315 | for_each_irq(irq) { | 317 | for_each_irq(irq) { |
318 | struct irq_chip *chip; | ||
319 | |||
316 | desc = irq_to_desc(irq); | 320 | desc = irq_to_desc(irq); |
317 | if (!desc) | 321 | if (!desc) |
318 | continue; | 322 | continue; |
@@ -320,13 +324,15 @@ void fixup_irqs(const struct cpumask *map) | |||
320 | if (desc->status & IRQ_PER_CPU) | 324 | if (desc->status & IRQ_PER_CPU) |
321 | continue; | 325 | continue; |
322 | 326 | ||
323 | cpumask_and(mask, desc->affinity, map); | 327 | chip = get_irq_desc_chip(desc); |
328 | |||
329 | cpumask_and(mask, desc->irq_data.affinity, map); | ||
324 | if (cpumask_any(mask) >= nr_cpu_ids) { | 330 | if (cpumask_any(mask) >= nr_cpu_ids) { |
325 | printk("Breaking affinity for irq %i\n", irq); | 331 | printk("Breaking affinity for irq %i\n", irq); |
326 | cpumask_copy(mask, map); | 332 | cpumask_copy(mask, map); |
327 | } | 333 | } |
328 | if (desc->chip->set_affinity) | 334 | if (chip->irq_set_affinity) |
329 | desc->chip->set_affinity(irq, mask); | 335 | chip->irq_set_affinity(&desc->irq_data, mask, true); |
330 | else if (desc->action && !(warned++)) | 336 | else if (desc->action && !(warned++)) |
331 | printk("Cannot set affinity for irq %i\n", irq); | 337 | printk("Cannot set affinity for irq %i\n", irq); |
332 | } | 338 | } |
@@ -1145,11 +1151,14 @@ static int virq_debug_show(struct seq_file *m, void *private) | |||
1145 | raw_spin_lock_irqsave(&desc->lock, flags); | 1151 | raw_spin_lock_irqsave(&desc->lock, flags); |
1146 | 1152 | ||
1147 | if (desc->action && desc->action->handler) { | 1153 | if (desc->action && desc->action->handler) { |
1154 | struct irq_chip *chip; | ||
1155 | |||
1148 | seq_printf(m, "%5d ", i); | 1156 | seq_printf(m, "%5d ", i); |
1149 | seq_printf(m, "0x%05lx ", virq_to_hw(i)); | 1157 | seq_printf(m, "0x%05lx ", virq_to_hw(i)); |
1150 | 1158 | ||
1151 | if (desc->chip && desc->chip->name) | 1159 | chip = get_irq_desc_chip(desc); |
1152 | p = desc->chip->name; | 1160 | if (chip && chip->name) |
1161 | p = chip->name; | ||
1153 | else | 1162 | else |
1154 | p = none; | 1163 | p = none; |
1155 | seq_printf(m, "%-15s ", p); | 1164 | seq_printf(m, "%-15s ", p); |