aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300/kernel/irq.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-24 13:54:24 -0400
committerThomas Gleixner <tglx@linutronix.de>2011-03-29 08:48:19 -0400
commit2a8f55b1f577c205e71ddcb696564cbd05c50eb5 (patch)
tree6a2eb6dfd70bcdb0952ca4a62be1e8b1bd32dca4 /arch/mn10300/kernel/irq.c
parent232f1d8591dd1933a39fba5378763f5210dce138 (diff)
mn10300: Use generic show_interrupts()
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/mn10300/kernel/irq.c')
-rw-r--r--arch/mn10300/kernel/irq.c68
1 files changed, 10 insertions, 58 deletions
diff --git a/arch/mn10300/kernel/irq.c b/arch/mn10300/kernel/irq.c
index 8f9e272f2a39..86af0d7d0771 100644
--- a/arch/mn10300/kernel/irq.c
+++ b/arch/mn10300/kernel/irq.c
@@ -335,68 +335,20 @@ asmlinkage void do_IRQ(void)
335/* 335/*
336 * Display interrupt management information through /proc/interrupts 336 * Display interrupt management information through /proc/interrupts
337 */ 337 */
338int show_interrupts(struct seq_file *p, void *v) 338int arch_show_interrupts(struct seq_file *p, int prec)
339{ 339{
340 int i = *(loff_t *) v, j, cpu;
341 struct irqaction *action;
342 unsigned long flags;
343
344 switch (i) {
345 /* display column title bar naming CPUs */
346 case 0:
347 seq_printf(p, " ");
348 for (j = 0; j < NR_CPUS; j++)
349 if (cpu_online(j))
350 seq_printf(p, "CPU%d ", j);
351 seq_putc(p, '\n');
352 break;
353
354 /* display information rows, one per active CPU */
355 case 1 ... NR_IRQS - 1:
356 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
357
358 action = irq_desc[i].action;
359 if (action) {
360 seq_printf(p, "%3d: ", i);
361 for_each_present_cpu(cpu)
362 seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu));
363
364 if (i < NR_CPU_IRQS)
365 seq_printf(p, " %14s.%u",
366 irq_desc[i].irq_data.chip->name,
367 (GxICR(i) & GxICR_LEVEL) >>
368 GxICR_LEVEL_SHIFT);
369 else
370 seq_printf(p, " %14s",
371 irq_desc[i].irq_data.chip->name);
372
373 seq_printf(p, " %s", action->name);
374
375 for (action = action->next;
376 action;
377 action = action->next)
378 seq_printf(p, ", %s", action->name);
379
380 seq_putc(p, '\n');
381 }
382
383 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
384 break;
385
386 /* polish off with NMI and error counters */
387 case NR_IRQS:
388#ifdef CONFIG_MN10300_WD_TIMER 340#ifdef CONFIG_MN10300_WD_TIMER
389 seq_printf(p, "NMI: "); 341 int j;
390 for (j = 0; j < NR_CPUS; j++)
391 if (cpu_online(j))
392 seq_printf(p, "%10u ", nmi_count(j));
393 seq_putc(p, '\n');
394#endif
395 342
396 seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); 343 seq_printf(p, "%*s: ", prec, "NMI");
397 break; 344 for (j = 0; j < NR_CPUS; j++)
398 } 345 if (cpu_online(j))
346 seq_printf(p, "%10u ", nmi_count(j));
347 seq_putc(p, '\n');
348#endif
399 349
350 seq_printf(p, "%*s: ", prec, "ERR");
351 seq_printf(p, "%10u\n", atomic_read(&irq_err_count));
400 return 0; 352 return 0;
401} 353}
402 354