diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-03-25 11:48:50 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-03-25 12:04:20 -0400 |
commit | ab7798ffcf98b11a9525cf65bacdae3fd58d357f (patch) | |
tree | 834ed73e8ab309895934bcf8bfe9e531ec10b32b /kernel/irq/proc.c | |
parent | 08f1b807355c8d355885a71e7fd462fe9d499411 (diff) |
genirq: Expand generic show_interrupts()
Some archs want to print extra information for certain irq_chips which
is per irq and not per chip. Allow them to provide a chip callback to
print the chip name and the extra information.
PowerPC wants to print the LEVEL/EDGE type information. Make it configurable.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/proc.c')
-rw-r--r-- | kernel/irq/proc.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 760248de109d..626d092eed9a 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c | |||
@@ -404,7 +404,20 @@ int show_interrupts(struct seq_file *p, void *v) | |||
404 | seq_printf(p, "%*d: ", prec, i); | 404 | seq_printf(p, "%*d: ", prec, i); |
405 | for_each_online_cpu(j) | 405 | for_each_online_cpu(j) |
406 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); | 406 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); |
407 | seq_printf(p, " %8s", desc->irq_data.chip->name); | 407 | |
408 | if (desc->irq_data.chip) { | ||
409 | if (desc->irq_data.chip->irq_print_chip) | ||
410 | desc->irq_data.chip->irq_print_chip(&desc->irq_data, p); | ||
411 | else if (desc->irq_data.chip->name) | ||
412 | seq_printf(p, " %8s", desc->irq_data.chip->name); | ||
413 | else | ||
414 | seq_printf(p, " %8s", "-"); | ||
415 | } else { | ||
416 | seq_printf(p, " %8s", "None"); | ||
417 | } | ||
418 | #ifdef CONFIG_GENIRC_IRQ_SHOW_LEVEL | ||
419 | seq_printf(p, " %-8s", irqd_is_level_type(&desc->irq_data) ? "Level" : "Edge"); | ||
420 | #endif | ||
408 | if (desc->name) | 421 | if (desc->name) |
409 | seq_printf(p, "-%-8s", desc->name); | 422 | seq_printf(p, "-%-8s", desc->name); |
410 | 423 | ||