x86: also show non-zero IRQ counts for vectors that currently don't have a handler
PATCH 1/1 x86: also show non-zero IRQ counts for vectors that currently don't have a handler
It doesn't seem to make sense to hide these, even if their counts can't change at the point in time they're being displayed.
Signed-off-by Jan Beulich <[email protected]>
arch/i386/kernel/irq.c | 18 ++++++++++++++---- arch/x86_64/kernel/irq.c | 18 ++++++++++++++---- 2 files changed, 28 insertions(+), 8 deletions(-)
arch/i386/kernel/irq.c +14 -4
@@ -259,9 +259,17 @@ int show_interrupts(struct seq_file *p, }if (i <NR_IRQS ) { +unsigned any_count =0 ; +spin_lock_irqsave (&irq_desc[i].lock, flags); +#ifndef CONFIG_SMP + any_count =kstat_irqs (i); +#else +for_each_online_cpu (j) + any_count |=kstat_cpu (j).irqs[i]; +#endif action = irq_desc[i].action; -if (!action) +if (!action && !any_count) goto skip;seq_printf (p,"%3d: " ,i);#ifndef CONFIG_SMP
@@ -272,10 +280,12 @@ int show_interrupts(struct seq_file *p,#endif seq_printf (p," %8s" , irq_desc[i].chip->name);seq_printf (p,"-%-8s" , irq_desc[i].name); -seq_printf (p," %s" , action->name); -for (action=action->next; action; action = action->next) -seq_printf (p,", %s" , action->name); +if (action) { +seq_printf (p," %s" , action->name); +while ((action = action->next) !=NULL ) +seq_printf (p,", %s" , action->name); + }seq_putc (p,'\n' ); skip:
arch/x86_64/kernel/irq.c +14 -4
@@ -64,9 +64,17 @@ int show_interrupts(struct seq_file *p, }if (i <NR_IRQS ) { +unsigned any_count =0 ; +spin_lock_irqsave (&irq_desc[i].lock, flags); +#ifndef CONFIG_SMP + any_count =kstat_irqs (i); +#else +for_each_online_cpu (j) + any_count |=kstat_cpu (j).irqs[i]; +#endif action = irq_desc[i].action; -if (!action) +if (!action && !any_count) goto skip;seq_printf (p,"%3d: " ,i);#ifndef CONFIG_SMP
@@ -78,9 +86,11 @@ int show_interrupts(struct seq_file *p,seq_printf (p," %8s" , irq_desc[i].chip->name);seq_printf (p,"-%-8s" , irq_desc[i].name); -seq_printf (p," %s" , action->name); -for (action=action->next; action; action = action->next) -seq_printf (p,", %s" , action->name); +if (action) { +seq_printf (p," %s" , action->name); +while ((action = action->next) !=NULL ) +seq_printf (p,", %s" , action->name); + }seq_putc (p,'\n' ); skip:spin_unlock_irqrestore (&irq_desc[i].lock, flags);
Quoted 2 lines · On Wednesday 19 September 2007 16:41:57 Jan Beulich wrote:
It doesn't seem to make sense to hide these, even if their counts can't change at the point in time they're being displayed.
Applied thanks
I hope irqbalanced can handle that, but we'll find out.
-Andi