Commit a6e120ed authored by Thomas Gleixner's avatar Thomas Gleixner

alpha: Use generic show_interrupts()

The only subtle difference is that alpha uses ACTUAL_NR_IRQS and
prints the IRQF_DISABLED flag.

Change the generic implementation to deal with ACTUAL_NR_IRQS if
defined.

The IRQF_DISABLED printing is pointless, as we nowadays run all
interrupts with irqs disabled.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent a9eb076b
...@@ -11,6 +11,7 @@ config ALPHA ...@@ -11,6 +11,7 @@ config ALPHA
select HAVE_GENERIC_HARDIRQS select HAVE_GENERIC_HARDIRQS
select GENERIC_IRQ_PROBE select GENERIC_IRQ_PROBE
select AUTO_IRQ_AFFINITY if SMP select AUTO_IRQ_AFFINITY if SMP
select GENERIC_IRQ_SHOW
select GENERIC_HARDIRQS_NO_DEPRECATED select GENERIC_HARDIRQS_NO_DEPRECATED
help help
The Alpha is a 64-bit general-purpose processor designed and The Alpha is a 64-bit general-purpose processor designed and
......
...@@ -67,56 +67,10 @@ int irq_select_affinity(unsigned int irq) ...@@ -67,56 +67,10 @@ int irq_select_affinity(unsigned int irq)
} }
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
int int arch_show_interrupts(struct seq_file *p, int prec)
show_interrupts(struct seq_file *p, void *v)
{ {
int j; int j;
int irq = *(loff_t *) v;
struct irqaction * action;
struct irq_desc *desc;
unsigned long flags;
#ifdef CONFIG_SMP
if (irq == 0) {
seq_puts(p, " ");
for_each_online_cpu(j)
seq_printf(p, "CPU%d ", j);
seq_putc(p, '\n');
}
#endif
if (irq < ACTUAL_NR_IRQS) {
desc = irq_to_desc(irq);
if (!desc)
return 0;
raw_spin_lock_irqsave(&desc->lock, flags);
action = desc->action;
if (!action)
goto unlock;
seq_printf(p, "%3d: ", irq);
#ifndef CONFIG_SMP
seq_printf(p, "%10u ", kstat_irqs(irq));
#else
for_each_online_cpu(j)
seq_printf(p, "%10u ", kstat_irqs_cpu(irq, j));
#endif
seq_printf(p, " %14s", irq_desc_get_chip(desc)->name);
seq_printf(p, " %c%s",
(action->flags & IRQF_DISABLED)?'+':' ',
action->name);
for (action=action->next; action; action = action->next) {
seq_printf(p, ", %c%s",
(action->flags & IRQF_DISABLED)?'+':' ',
action->name);
}
seq_putc(p, '\n');
unlock:
raw_spin_unlock_irqrestore(&desc->lock, flags);
} else if (irq == ACTUAL_NR_IRQS) {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
seq_puts(p, "IPI: "); seq_puts(p, "IPI: ");
for_each_online_cpu(j) for_each_online_cpu(j)
...@@ -128,7 +82,6 @@ show_interrupts(struct seq_file *p, void *v) ...@@ -128,7 +82,6 @@ show_interrupts(struct seq_file *p, void *v)
seq_printf(p, "%10lu ", per_cpu(irq_pmi_count, j)); seq_printf(p, "%10lu ", per_cpu(irq_pmi_count, j));
seq_puts(p, " Performance Monitoring\n"); seq_puts(p, " Performance Monitoring\n");
seq_printf(p, "ERR: %10lu\n", irq_err_count); seq_printf(p, "ERR: %10lu\n", irq_err_count);
}
return 0; return 0;
} }
......
...@@ -364,6 +364,10 @@ int __weak arch_show_interrupts(struct seq_file *p, int prec) ...@@ -364,6 +364,10 @@ int __weak arch_show_interrupts(struct seq_file *p, int prec)
return 0; return 0;
} }
#ifndef ACTUAL_NR_IRQS
# define ACTUAL_NR_IRQS nr_irqs
#endif
int show_interrupts(struct seq_file *p, void *v) int show_interrupts(struct seq_file *p, void *v)
{ {
static int prec; static int prec;
...@@ -373,10 +377,10 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -373,10 +377,10 @@ int show_interrupts(struct seq_file *p, void *v)
struct irqaction *action; struct irqaction *action;
struct irq_desc *desc; struct irq_desc *desc;
if (i > nr_irqs) if (i > ACTUAL_NR_IRQS)
return 0; return 0;
if (i == nr_irqs) if (i == ACTUAL_NR_IRQS)
return arch_show_interrupts(p, prec); return arch_show_interrupts(p, prec);
/* print header and calculate the width of the first column */ /* print header and calculate the width of the first column */
......
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