Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181900
b: refs/heads/master
c: c86845e
h: refs/heads/master
v: v3
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Feb 17, 2010
1 parent 63705ca commit 05c5aa4
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 34 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: fda9d86100e0b412d0c8a16abe0651c8c8e39e81
refs/heads/master: c86845ede8b643ca025aec277dec1892d0ccac01
79 changes: 46 additions & 33 deletions trunk/arch/powerpc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,65 +183,78 @@ notrace void raw_local_irq_restore(unsigned long en)
EXPORT_SYMBOL(raw_local_irq_restore);
#endif /* CONFIG_PPC64 */

static int show_other_interrupts(struct seq_file *p, int prec)
{
int j;

#if defined(CONFIG_PPC32) && defined(CONFIG_TAU_INT)
if (tau_initialized) {
seq_printf(p, "%*s: ", prec, "TAU");
for_each_online_cpu(j)
seq_printf(p, "%10u ", tau_interrupts(j));
seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n");
}
#endif /* CONFIG_PPC32 && CONFIG_TAU_INT */

seq_printf(p, "%*s: %10u\n", prec, "BAD", ppc_spurious_interrupts);

return 0;
}

int show_interrupts(struct seq_file *p, void *v)
{
int i = *(loff_t *)v, j;
unsigned long flags, any_count = 0;
int i = *(loff_t *) v, j, prec;
struct irqaction *action;
struct irq_desc *desc;
unsigned long flags;

if (i > nr_irqs)
return 0;

for (prec = 3, j = 1000; prec < 10 && j <= nr_irqs; ++prec)
j *= 10;

if (i == nr_irqs)
return show_other_interrupts(p, prec);

/* print header */
if (i == 0) {
seq_puts(p, " ");
seq_printf(p, "%*s", prec + 8, "");
for_each_online_cpu(j)
seq_printf(p, "CPU%d ", j);
seq_printf(p, "CPU%-8d", j);
seq_putc(p, '\n');
} else if (i == nr_irqs) {
#if defined(CONFIG_PPC32) && defined(CONFIG_TAU_INT)
if (tau_initialized){
seq_puts(p, "TAU: ");
for_each_online_cpu(j)
seq_printf(p, "%10u ", tau_interrupts(j));
seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n");
}
#endif /* CONFIG_PPC32 && CONFIG_TAU_INT*/
seq_printf(p, "BAD: %10u\n", ppc_spurious_interrupts);

return 0;
}

desc = irq_to_desc(i);
if (!desc)
return 0;

raw_spin_lock_irqsave(&desc->lock, flags);

for_each_online_cpu(j)
any_count |= kstat_irqs_cpu(i, j);
action = desc->action;
if (!action || !action->handler)
goto skip;
if (!action && !any_count)
goto out;

seq_printf(p, "%3d: ", i);
#ifdef CONFIG_SMP
seq_printf(p, "%*d: ", prec, i);
for_each_online_cpu(j)
seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
#else
seq_printf(p, "%10u ", kstat_irqs(i));
#endif /* CONFIG_SMP */

if (desc->chip)
seq_printf(p, " %s ", desc->chip->name);
seq_printf(p, " %-16s", desc->chip->name);
else
seq_puts(p, " None ");
seq_printf(p, " %-16s", "None");
seq_printf(p, " %-8s", (desc->status & IRQ_LEVEL) ? "Level" : "Edge");

seq_printf(p, "%s", (desc->status & IRQ_LEVEL) ? "Level " : "Edge ");
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);
}

for (action = action->next; action; action = action->next)
seq_printf(p, ", %s", action->name);
seq_putc(p, '\n');

skip:
out:
raw_spin_unlock_irqrestore(&desc->lock, flags);

return 0;
}

Expand Down

0 comments on commit 05c5aa4

Please sign in to comment.