mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
arm: Use generic show_interrupts()
Use the generic version and just keep the arch specific output. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
cf0d6b76c1
commit
25a5662a13
@ -28,6 +28,7 @@ config ARM
|
|||||||
select HAVE_C_RECORDMCOUNT
|
select HAVE_C_RECORDMCOUNT
|
||||||
select HAVE_GENERIC_HARDIRQS
|
select HAVE_GENERIC_HARDIRQS
|
||||||
select HAVE_SPARSE_IRQ
|
select HAVE_SPARSE_IRQ
|
||||||
|
select GENERIC_IRQ_SHOW
|
||||||
help
|
help
|
||||||
The ARM series is a line of low-power-consumption RISC chip designs
|
The ARM series is a line of low-power-consumption RISC chip designs
|
||||||
licensed by ARM Ltd and targeted at embedded applications and
|
licensed by ARM Ltd and targeted at embedded applications and
|
||||||
|
@ -51,63 +51,18 @@
|
|||||||
|
|
||||||
unsigned long irq_err_count;
|
unsigned long irq_err_count;
|
||||||
|
|
||||||
int show_interrupts(struct seq_file *p, void *v)
|
int arch_show_interrupts(struct seq_file *p, int prec)
|
||||||
{
|
{
|
||||||
int i = *(loff_t *) v, cpu;
|
|
||||||
struct irq_desc *desc;
|
|
||||||
struct irqaction * action;
|
|
||||||
unsigned long flags;
|
|
||||||
int prec, n;
|
|
||||||
|
|
||||||
for (prec = 3, n = 1000; prec < 10 && n <= nr_irqs; prec++)
|
|
||||||
n *= 10;
|
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
|
||||||
if (prec < 4)
|
|
||||||
prec = 4;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (i == 0) {
|
|
||||||
char cpuname[12];
|
|
||||||
|
|
||||||
seq_printf(p, "%*s ", prec, "");
|
|
||||||
for_each_present_cpu(cpu) {
|
|
||||||
sprintf(cpuname, "CPU%d", cpu);
|
|
||||||
seq_printf(p, " %10s", cpuname);
|
|
||||||
}
|
|
||||||
seq_putc(p, '\n');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i < nr_irqs) {
|
|
||||||
desc = irq_to_desc(i);
|
|
||||||
raw_spin_lock_irqsave(&desc->lock, flags);
|
|
||||||
action = desc->action;
|
|
||||||
if (!action)
|
|
||||||
goto unlock;
|
|
||||||
|
|
||||||
seq_printf(p, "%*d: ", prec, i);
|
|
||||||
for_each_present_cpu(cpu)
|
|
||||||
seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu));
|
|
||||||
seq_printf(p, " %10s", desc->irq_data.chip->name ? : "-");
|
|
||||||
seq_printf(p, " %s", action->name);
|
|
||||||
for (action = action->next; action; action = action->next)
|
|
||||||
seq_printf(p, ", %s", action->name);
|
|
||||||
|
|
||||||
seq_putc(p, '\n');
|
|
||||||
unlock:
|
|
||||||
raw_spin_unlock_irqrestore(&desc->lock, flags);
|
|
||||||
} else if (i == nr_irqs) {
|
|
||||||
#ifdef CONFIG_FIQ
|
#ifdef CONFIG_FIQ
|
||||||
show_fiq_list(p, prec);
|
show_fiq_list(p, prec);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
show_ipi_list(p, prec);
|
show_ipi_list(p, prec);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_LOCAL_TIMERS
|
#ifdef CONFIG_LOCAL_TIMERS
|
||||||
show_local_irqs(p, prec);
|
show_local_irqs(p, prec);
|
||||||
#endif
|
#endif
|
||||||
seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count);
|
seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count);
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user