Commit e1180287 authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by Benjamin Herrenschmidt

powerpc: core irq_data conversion.

Signed-off-by: default avatarLennert Buytenhek <buytenh@secretlab.ca>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 73909af7
...@@ -237,6 +237,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -237,6 +237,7 @@ int show_interrupts(struct seq_file *p, void *v)
int i = *(loff_t *) v, j, prec; int i = *(loff_t *) v, j, prec;
struct irqaction *action; struct irqaction *action;
struct irq_desc *desc; struct irq_desc *desc;
struct irq_chip *chip;
if (i > nr_irqs) if (i > nr_irqs)
return 0; return 0;
...@@ -270,8 +271,9 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -270,8 +271,9 @@ int show_interrupts(struct seq_file *p, void *v)
for_each_online_cpu(j) for_each_online_cpu(j)
seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
if (desc->chip) chip = get_irq_desc_chip(desc);
seq_printf(p, " %-16s", desc->chip->name); if (chip)
seq_printf(p, " %-16s", chip->name);
else else
seq_printf(p, " %-16s", "None"); seq_printf(p, " %-16s", "None");
seq_printf(p, " %-8s", (desc->status & IRQ_LEVEL) ? "Level" : "Edge"); seq_printf(p, " %-8s", (desc->status & IRQ_LEVEL) ? "Level" : "Edge");
...@@ -313,6 +315,8 @@ void fixup_irqs(const struct cpumask *map) ...@@ -313,6 +315,8 @@ void fixup_irqs(const struct cpumask *map)
alloc_cpumask_var(&mask, GFP_KERNEL); alloc_cpumask_var(&mask, GFP_KERNEL);
for_each_irq(irq) { for_each_irq(irq) {
struct irq_chip *chip;
desc = irq_to_desc(irq); desc = irq_to_desc(irq);
if (!desc) if (!desc)
continue; continue;
...@@ -320,13 +324,15 @@ void fixup_irqs(const struct cpumask *map) ...@@ -320,13 +324,15 @@ void fixup_irqs(const struct cpumask *map)
if (desc->status & IRQ_PER_CPU) if (desc->status & IRQ_PER_CPU)
continue; continue;
cpumask_and(mask, desc->affinity, map); chip = get_irq_desc_chip(desc);
cpumask_and(mask, desc->irq_data.affinity, map);
if (cpumask_any(mask) >= nr_cpu_ids) { if (cpumask_any(mask) >= nr_cpu_ids) {
printk("Breaking affinity for irq %i\n", irq); printk("Breaking affinity for irq %i\n", irq);
cpumask_copy(mask, map); cpumask_copy(mask, map);
} }
if (desc->chip->set_affinity) if (chip->irq_set_affinity)
desc->chip->set_affinity(irq, mask); chip->irq_set_affinity(&desc->irq_data, mask, true);
else if (desc->action && !(warned++)) else if (desc->action && !(warned++))
printk("Cannot set affinity for irq %i\n", irq); printk("Cannot set affinity for irq %i\n", irq);
} }
...@@ -1145,11 +1151,14 @@ static int virq_debug_show(struct seq_file *m, void *private) ...@@ -1145,11 +1151,14 @@ static int virq_debug_show(struct seq_file *m, void *private)
raw_spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
if (desc->action && desc->action->handler) { if (desc->action && desc->action->handler) {
struct irq_chip *chip;
seq_printf(m, "%5d ", i); seq_printf(m, "%5d ", i);
seq_printf(m, "0x%05lx ", virq_to_hw(i)); seq_printf(m, "0x%05lx ", virq_to_hw(i));
if (desc->chip && desc->chip->name) chip = get_irq_desc_chip(desc);
p = desc->chip->name; if (chip && chip->name)
p = chip->name;
else else
p = none; p = none;
seq_printf(m, "%-15s ", p); seq_printf(m, "%-15s ", p);
......
...@@ -26,20 +26,23 @@ void machine_kexec_mask_interrupts(void) { ...@@ -26,20 +26,23 @@ void machine_kexec_mask_interrupts(void) {
for_each_irq(i) { for_each_irq(i) {
struct irq_desc *desc = irq_to_desc(i); struct irq_desc *desc = irq_to_desc(i);
struct irq_chip *chip;
if (!desc || !desc->chip) if (!desc)
continue; continue;
if (desc->chip->eoi && chip = get_irq_desc_chip(desc);
desc->status & IRQ_INPROGRESS) if (!chip)
desc->chip->eoi(i); continue;
if (chip->irq_eoi && desc->status & IRQ_INPROGRESS)
chip->irq_eoi(&desc->irq_data);
if (desc->chip->mask) if (chip->irq_mask)
desc->chip->mask(i); chip->irq_mask(&desc->irq_data);
if (desc->chip->disable && if (chip->irq_disable && !(desc->status & IRQ_DISABLED))
!(desc->status & IRQ_DISABLED)) chip->irq_disable(&desc->irq_data);
desc->chip->disable(i);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment