aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/irq.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2011-01-05 06:47:28 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2011-01-05 06:47:25 -0500
commit052ff461c8427629aee887ccc27478fc7373237c (patch)
tree1b2cae2956cc94c5b32730d467e20ff447b8c072 /arch/s390/kernel/irq.c
parent545b288dcbdea58a2ce2afba5f6a8302d31ac459 (diff)
[S390] irq: have detailed statistics for interrupt types
Up to now /proc/interrupts only has statistics for external and i/o interrupts but doesn't split up them any further. This patch adds a line for every single interrupt source so that it is possible to easier tell what the machine is/was doing. Part of the output now looks like this; CPU0 CPU2 CPU4 EXT: 3898 4232 2305 I/O: 782 315 245 CLK: 1029 1964 727 [EXT] Clock Comparator IPI: 2868 2267 1577 [EXT] Signal Processor TMR: 0 0 0 [EXT] CPU Timer TAL: 0 0 0 [EXT] Timing Alert PFL: 0 0 0 [EXT] Pseudo Page Fault [...] NMI: 0 1 1 [NMI] Machine Checks Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/irq.c')
-rw-r--r--arch/s390/kernel/irq.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c
index 026a37a94fc9..9bd049b8f997 100644
--- a/arch/s390/kernel/irq.c
+++ b/arch/s390/kernel/irq.c
@@ -1,7 +1,5 @@
1/* 1/*
2 * arch/s390/kernel/irq.c 2 * Copyright IBM Corp. 2004,2010
3 *
4 * Copyright IBM Corp. 2004,2007
5 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com), 3 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
6 * Thomas Spatzier (tspat@de.ibm.com) 4 * Thomas Spatzier (tspat@de.ibm.com)
7 * 5 *
@@ -17,12 +15,31 @@
17#include <linux/proc_fs.h> 15#include <linux/proc_fs.h>
18#include <linux/profile.h> 16#include <linux/profile.h>
19 17
18struct irq_class {
19 char *name;
20 char *desc;
21};
22
23static const struct irq_class intrclass_names[] = {
24 {.name = "EXT" },
25 {.name = "I/O" },
26 {.name = "CLK", .desc = "[EXT] Clock Comparator" },
27 {.name = "IPI", .desc = "[EXT] Signal Processor" },
28 {.name = "TMR", .desc = "[EXT] CPU Timer" },
29 {.name = "TAL", .desc = "[EXT] Timing Alert" },
30 {.name = "PFL", .desc = "[EXT] Pseudo Page Fault" },
31 {.name = "DSD", .desc = "[EXT] DASD Diag" },
32 {.name = "VRT", .desc = "[EXT] Virtio" },
33 {.name = "SCP", .desc = "[EXT] Service Call" },
34 {.name = "IUC", .desc = "[EXT] IUCV" },
35 {.name = "NMI", .desc = "[NMI] Machine Check" },
36};
37
20/* 38/*
21 * show_interrupts is needed by /proc/interrupts. 39 * show_interrupts is needed by /proc/interrupts.
22 */ 40 */
23int show_interrupts(struct seq_file *p, void *v) 41int show_interrupts(struct seq_file *p, void *v)
24{ 42{
25 static const char *intrclass_names[] = { "EXT", "I/O", };
26 int i = *(loff_t *) v, j; 43 int i = *(loff_t *) v, j;
27 44
28 get_online_cpus(); 45 get_online_cpus();
@@ -34,15 +51,16 @@ int show_interrupts(struct seq_file *p, void *v)
34 } 51 }
35 52
36 if (i < NR_IRQS) { 53 if (i < NR_IRQS) {
37 seq_printf(p, "%s: ", intrclass_names[i]); 54 seq_printf(p, "%s: ", intrclass_names[i].name);
38#ifndef CONFIG_SMP 55#ifndef CONFIG_SMP
39 seq_printf(p, "%10u ", kstat_irqs(i)); 56 seq_printf(p, "%10u ", kstat_irqs(i));
40#else 57#else
41 for_each_online_cpu(j) 58 for_each_online_cpu(j)
42 seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); 59 seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
43#endif 60#endif
61 if (intrclass_names[i].desc)
62 seq_printf(p, " %s", intrclass_names[i].desc);
44 seq_putc(p, '\n'); 63 seq_putc(p, '\n');
45
46 } 64 }
47 put_online_cpus(); 65 put_online_cpus();
48 return 0; 66 return 0;