aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/irq.c')
-rw-r--r--arch/s390/kernel/irq.c41
1 files changed, 35 insertions, 6 deletions
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c
index 026a37a94fc9..ea5099c9709c 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,42 @@
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 = "QAI", .desc = "[I/O] QDIO Adapter Interrupt" },
36 {.name = "QDI", .desc = "[I/O] QDIO Interrupt" },
37 {.name = "DAS", .desc = "[I/O] DASD" },
38 {.name = "C15", .desc = "[I/O] 3215" },
39 {.name = "C70", .desc = "[I/O] 3270" },
40 {.name = "TAP", .desc = "[I/O] Tape" },
41 {.name = "VMR", .desc = "[I/O] Unit Record Devices" },
42 {.name = "LCS", .desc = "[I/O] LCS" },
43 {.name = "CLW", .desc = "[I/O] CLAW" },
44 {.name = "CTC", .desc = "[I/O] CTC" },
45 {.name = "APB", .desc = "[I/O] AP Bus" },
46 {.name = "NMI", .desc = "[NMI] Machine Check" },
47};
48
20/* 49/*
21 * show_interrupts is needed by /proc/interrupts. 50 * show_interrupts is needed by /proc/interrupts.
22 */ 51 */
23int show_interrupts(struct seq_file *p, void *v) 52int show_interrupts(struct seq_file *p, void *v)
24{ 53{
25 static const char *intrclass_names[] = { "EXT", "I/O", };
26 int i = *(loff_t *) v, j; 54 int i = *(loff_t *) v, j;
27 55
28 get_online_cpus(); 56 get_online_cpus();
@@ -34,15 +62,16 @@ int show_interrupts(struct seq_file *p, void *v)
34 } 62 }
35 63
36 if (i < NR_IRQS) { 64 if (i < NR_IRQS) {
37 seq_printf(p, "%s: ", intrclass_names[i]); 65 seq_printf(p, "%s: ", intrclass_names[i].name);
38#ifndef CONFIG_SMP 66#ifndef CONFIG_SMP
39 seq_printf(p, "%10u ", kstat_irqs(i)); 67 seq_printf(p, "%10u ", kstat_irqs(i));
40#else 68#else
41 for_each_online_cpu(j) 69 for_each_online_cpu(j)
42 seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); 70 seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
43#endif 71#endif
72 if (intrclass_names[i].desc)
73 seq_printf(p, " %s", intrclass_names[i].desc);
44 seq_putc(p, '\n'); 74 seq_putc(p, '\n');
45
46 } 75 }
47 put_online_cpus(); 76 put_online_cpus();
48 return 0; 77 return 0;