Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71016
b: refs/heads/master
c: 072f5d8
h: refs/heads/master
v: v3
  • Loading branch information
Jan Beulich authored and Thomas Gleixner committed Oct 17, 2007
1 parent e351aab commit ab692fe
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 38e760a1335ffaca5a08624a9aed6fe2055c2c98
refs/heads/master: 072f5d82b58cba760191393a6a99fd1123c76e67
18 changes: 14 additions & 4 deletions trunk/arch/x86/kernel/irq_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,17 @@ int show_interrupts(struct seq_file *p, void *v)
}

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
Expand All @@ -268,10 +276,12 @@ int show_interrupts(struct seq_file *p, void *v)
#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:
Expand Down
18 changes: 14 additions & 4 deletions trunk/arch/x86/kernel/irq_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,17 @@ int show_interrupts(struct seq_file *p, void *v)
}

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
Expand All @@ -76,9 +84,11 @@ int show_interrupts(struct seq_file *p, void *v)
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);
Expand Down

0 comments on commit ab692fe

Please sign in to comment.