aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-25 11:36:35 -0400
committerThomas Gleixner <tglx@linutronix.de>2011-03-29 08:48:12 -0400
commit7bfbc1f28311d680e45d7122ecd48dec57703750 (patch)
tree0ea125a5b417aadab4375219d71d22eb7eb99d27 /arch
parentddaedd1c4aa0762563ca0cfdb22bbd8ef3ef785a (diff)
powerpc: irq: Use irqdata based information
We want to tighten the irq_desc access. So use the new accessors for the same information. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/irq.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 8f7da4402e9b..58d401265328 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -276,7 +276,7 @@ int show_interrupts(struct seq_file *p, void *v)
276 seq_printf(p, " %-16s", chip->name); 276 seq_printf(p, " %-16s", chip->name);
277 else 277 else
278 seq_printf(p, " %-16s", "None"); 278 seq_printf(p, " %-16s", "None");
279 seq_printf(p, " %-8s", (desc->status & IRQ_LEVEL) ? "Level" : "Edge"); 279 seq_printf(p, " %-8s", (irqd_is_level_type(&desc->irq_data) ? "Level" : "Edge");
280 280
281 if (action) { 281 if (action) {
282 seq_printf(p, " %s", action->name); 282 seq_printf(p, " %s", action->name);
@@ -315,24 +315,26 @@ void fixup_irqs(const struct cpumask *map)
315 alloc_cpumask_var(&mask, GFP_KERNEL); 315 alloc_cpumask_var(&mask, GFP_KERNEL);
316 316
317 for_each_irq(irq) { 317 for_each_irq(irq) {
318 struct irq_data *data;
318 struct irq_chip *chip; 319 struct irq_chip *chip;
319 320
320 desc = irq_to_desc(irq); 321 desc = irq_to_desc(irq);
321 if (!desc) 322 if (!desc)
322 continue; 323 continue;
323 324
324 if (desc->status & IRQ_PER_CPU) 325 data = irq_desc_get_irq_data(desc);
326 if (irqd_is_per_cpu(data))
325 continue; 327 continue;
326 328
327 chip = get_irq_desc_chip(desc); 329 chip = irq_data_get_irq_chip(data);
328 330
329 cpumask_and(mask, desc->irq_data.affinity, map); 331 cpumask_and(mask, data->affinity, map);
330 if (cpumask_any(mask) >= nr_cpu_ids) { 332 if (cpumask_any(mask) >= nr_cpu_ids) {
331 printk("Breaking affinity for irq %i\n", irq); 333 printk("Breaking affinity for irq %i\n", irq);
332 cpumask_copy(mask, map); 334 cpumask_copy(mask, map);
333 } 335 }
334 if (chip->irq_set_affinity) 336 if (chip->irq_set_affinity)
335 chip->irq_set_affinity(&desc->irq_data, mask, true); 337 chip->irq_set_affinity(data, mask, true);
336 else if (desc->action && !(warned++)) 338 else if (desc->action && !(warned++))
337 printk("Cannot set affinity for irq %i\n", irq); 339 printk("Cannot set affinity for irq %i\n", irq);
338 } 340 }
@@ -827,7 +829,7 @@ unsigned int irq_create_of_mapping(struct device_node *controller,
827 829
828 /* Set type if specified and different than the current one */ 830 /* Set type if specified and different than the current one */
829 if (type != IRQ_TYPE_NONE && 831 if (type != IRQ_TYPE_NONE &&
830 type != (irq_to_desc(virq)->status & IRQF_TRIGGER_MASK)) 832 type != (irqd_get_trigger_type(irq_get_irq_data(virq))))
831 set_irq_type(virq, type); 833 set_irq_type(virq, type);
832 return virq; 834 return virq;
833} 835}