RE: [PATCH] Add irq host and hwirq pair fields to output whenshowing interrupts.
From: Zhang Wei-r63237 <hidden>
Date: 2007-03-13 09:32:30
On Tue, 2007-03-13 at 11:19 +0800, Zhang Wei wrote:quoted
Signed-off-by: Zhang Wei <redacted> --- arch/powerpc/kernel/irq.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) =20diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 919fbf5..2a30ffd 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c@@ -194,7 +194,7 @@ #else seq_printf(p, "%10u ", kstat_irqs(i)); #endif /* CONFIG_SMP */ if (desc->chip) - seq_printf(p, " %s ", desc->chip->typename); + seq_printf(p, " (%3d) @%s ",=20(irq_map[i].host->revmap_type =3D=3D IRQ_HOST_MAP_LEGACY) ? i :=20 virq_to_hw(i), desc->chip->typename);quoted
else seq_puts(p, " None "); seq_printf(p, "%s", (desc->status & IRQ_LEVEL)=20? "Level " : "Edge "); =20 Well, first, we shouldn't modify the output of=20 /proc/interrupts as this will likely break all sort of userland tools displaying it (well, I think). =20 Now, regarding the patch itself, printing the hw irq is not=20 that useful without some indication of which host it belongs to. Best is to add a name() or something like that to the host ops. =20
Sure, can I use the PIC controller node full name from of_tree as the host name? Do you prefer debugfs instead of /proc/interrupts? Thanks! Zhang Wei