aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2017-02-14 12:13:09 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2019-04-29 04:47:01 -0400
commit914b7dd07ee8713c69c31ddb3e19a76852a846ac (patch)
tree10b38a641097c3061dfc856de1aeabad89e8d117
parente979ce7bced2ee019b5b1a040295484bd7f23680 (diff)
s390: show statistics for MSI IRQs
Improve /proc/interrupts on s390 to show statistics for individual MSI interrupts. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/include/asm/irq.h6
-rw-r--r--arch/s390/kernel/irq.c47
-rw-r--r--arch/s390/pci/pci_irq.c2
-rw-r--r--drivers/s390/cio/cio.c2
4 files changed, 43 insertions, 14 deletions
diff --git a/arch/s390/include/asm/irq.h b/arch/s390/include/asm/irq.h
index afaf5e3c57fd..d15943944054 100644
--- a/arch/s390/include/asm/irq.h
+++ b/arch/s390/include/asm/irq.h
@@ -47,7 +47,6 @@ enum interruption_class {
47 IRQEXT_CMC, 47 IRQEXT_CMC,
48 IRQEXT_FTP, 48 IRQEXT_FTP,
49 IRQIO_CIO, 49 IRQIO_CIO,
50 IRQIO_QAI,
51 IRQIO_DAS, 50 IRQIO_DAS,
52 IRQIO_C15, 51 IRQIO_C15,
53 IRQIO_C70, 52 IRQIO_C70,
@@ -55,12 +54,13 @@ enum interruption_class {
55 IRQIO_VMR, 54 IRQIO_VMR,
56 IRQIO_LCS, 55 IRQIO_LCS,
57 IRQIO_CTC, 56 IRQIO_CTC,
58 IRQIO_APB,
59 IRQIO_ADM, 57 IRQIO_ADM,
60 IRQIO_CSC, 58 IRQIO_CSC,
59 IRQIO_VIR,
60 IRQIO_QAI,
61 IRQIO_APB,
61 IRQIO_PCI, 62 IRQIO_PCI,
62 IRQIO_MSI, 63 IRQIO_MSI,
63 IRQIO_VIR,
64 IRQIO_VAI, 64 IRQIO_VAI,
65 IRQIO_GAL, 65 IRQIO_GAL,
66 NMI_NMI, 66 NMI_NMI,
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c
index 0cd5a5f96729..f586f94d3947 100644
--- a/arch/s390/kernel/irq.c
+++ b/arch/s390/kernel/irq.c
@@ -73,7 +73,6 @@ static const struct irq_class irqclass_sub_desc[] = {
73 {.irq = IRQEXT_CMC, .name = "CMC", .desc = "[EXT] CPU-Measurement: Counter"}, 73 {.irq = IRQEXT_CMC, .name = "CMC", .desc = "[EXT] CPU-Measurement: Counter"},
74 {.irq = IRQEXT_FTP, .name = "FTP", .desc = "[EXT] HMC FTP Service"}, 74 {.irq = IRQEXT_FTP, .name = "FTP", .desc = "[EXT] HMC FTP Service"},
75 {.irq = IRQIO_CIO, .name = "CIO", .desc = "[I/O] Common I/O Layer Interrupt"}, 75 {.irq = IRQIO_CIO, .name = "CIO", .desc = "[I/O] Common I/O Layer Interrupt"},
76 {.irq = IRQIO_QAI, .name = "QAI", .desc = "[I/O] QDIO Adapter Interrupt"},
77 {.irq = IRQIO_DAS, .name = "DAS", .desc = "[I/O] DASD"}, 76 {.irq = IRQIO_DAS, .name = "DAS", .desc = "[I/O] DASD"},
78 {.irq = IRQIO_C15, .name = "C15", .desc = "[I/O] 3215"}, 77 {.irq = IRQIO_C15, .name = "C15", .desc = "[I/O] 3215"},
79 {.irq = IRQIO_C70, .name = "C70", .desc = "[I/O] 3270"}, 78 {.irq = IRQIO_C70, .name = "C70", .desc = "[I/O] 3270"},
@@ -81,14 +80,15 @@ static const struct irq_class irqclass_sub_desc[] = {
81 {.irq = IRQIO_VMR, .name = "VMR", .desc = "[I/O] Unit Record Devices"}, 80 {.irq = IRQIO_VMR, .name = "VMR", .desc = "[I/O] Unit Record Devices"},
82 {.irq = IRQIO_LCS, .name = "LCS", .desc = "[I/O] LCS"}, 81 {.irq = IRQIO_LCS, .name = "LCS", .desc = "[I/O] LCS"},
83 {.irq = IRQIO_CTC, .name = "CTC", .desc = "[I/O] CTC"}, 82 {.irq = IRQIO_CTC, .name = "CTC", .desc = "[I/O] CTC"},
84 {.irq = IRQIO_APB, .name = "APB", .desc = "[I/O] AP Bus"},
85 {.irq = IRQIO_ADM, .name = "ADM", .desc = "[I/O] EADM Subchannel"}, 83 {.irq = IRQIO_ADM, .name = "ADM", .desc = "[I/O] EADM Subchannel"},
86 {.irq = IRQIO_CSC, .name = "CSC", .desc = "[I/O] CHSC Subchannel"}, 84 {.irq = IRQIO_CSC, .name = "CSC", .desc = "[I/O] CHSC Subchannel"},
87 {.irq = IRQIO_PCI, .name = "PCI", .desc = "[I/O] PCI Interrupt" },
88 {.irq = IRQIO_MSI, .name = "MSI", .desc = "[I/O] MSI Interrupt" },
89 {.irq = IRQIO_VIR, .name = "VIR", .desc = "[I/O] Virtual I/O Devices"}, 85 {.irq = IRQIO_VIR, .name = "VIR", .desc = "[I/O] Virtual I/O Devices"},
90 {.irq = IRQIO_VAI, .name = "VAI", .desc = "[I/O] Virtual I/O Devices AI"}, 86 {.irq = IRQIO_QAI, .name = "QAI", .desc = "[AIO] QDIO Adapter Interrupt"},
91 {.irq = IRQIO_GAL, .name = "GAL", .desc = "[I/O] GIB Alert"}, 87 {.irq = IRQIO_APB, .name = "APB", .desc = "[AIO] AP Bus"},
88 {.irq = IRQIO_PCI, .name = "PCI", .desc = "[AIO] PCI Interrupt"},
89 {.irq = IRQIO_MSI, .name = "MSI", .desc = "[AIO] MSI Interrupt"},
90 {.irq = IRQIO_VAI, .name = "VAI", .desc = "[AIO] Virtual I/O Devices AI"},
91 {.irq = IRQIO_GAL, .name = "GAL", .desc = "[AIO] GIB Alert"},
92 {.irq = NMI_NMI, .name = "NMI", .desc = "[NMI] Machine Check"}, 92 {.irq = NMI_NMI, .name = "NMI", .desc = "[NMI] Machine Check"},
93 {.irq = CPU_RST, .name = "RST", .desc = "[CPU] CPU Restart"}, 93 {.irq = CPU_RST, .name = "RST", .desc = "[CPU] CPU Restart"},
94}; 94};
@@ -116,6 +116,34 @@ void do_IRQ(struct pt_regs *regs, int irq)
116 set_irq_regs(old_regs); 116 set_irq_regs(old_regs);
117} 117}
118 118
119static void show_msi_interrupt(struct seq_file *p, int irq)
120{
121 struct irq_desc *desc;
122 unsigned long flags;
123 int cpu;
124
125 irq_lock_sparse();
126 desc = irq_to_desc(irq);
127 if (!desc)
128 goto out;
129
130 raw_spin_lock_irqsave(&desc->lock, flags);
131 seq_printf(p, "%3d: ", irq);
132 for_each_online_cpu(cpu)
133 seq_printf(p, "%10u ", kstat_irqs_cpu(irq, cpu));
134
135 if (desc->irq_data.chip)
136 seq_printf(p, " %8s", desc->irq_data.chip->name);
137
138 if (desc->action)
139 seq_printf(p, " %s", desc->action->name);
140
141 seq_putc(p, '\n');
142 raw_spin_unlock_irqrestore(&desc->lock, flags);
143out:
144 irq_unlock_sparse();
145}
146
119/* 147/*
120 * show_interrupts is needed by /proc/interrupts. 148 * show_interrupts is needed by /proc/interrupts.
121 */ 149 */
@@ -128,7 +156,7 @@ int show_interrupts(struct seq_file *p, void *v)
128 if (index == 0) { 156 if (index == 0) {
129 seq_puts(p, " "); 157 seq_puts(p, " ");
130 for_each_online_cpu(cpu) 158 for_each_online_cpu(cpu)
131 seq_printf(p, "CPU%d ", cpu); 159 seq_printf(p, "CPU%-8d", cpu);
132 seq_putc(p, '\n'); 160 seq_putc(p, '\n');
133 } 161 }
134 if (index < NR_IRQS_BASE) { 162 if (index < NR_IRQS_BASE) {
@@ -139,9 +167,10 @@ int show_interrupts(struct seq_file *p, void *v)
139 seq_putc(p, '\n'); 167 seq_putc(p, '\n');
140 goto out; 168 goto out;
141 } 169 }
142 if (index > NR_IRQS_BASE) 170 if (index < nr_irqs) {
171 show_msi_interrupt(p, index);
143 goto out; 172 goto out;
144 173 }
145 for (index = 0; index < NR_ARCH_IRQS; index++) { 174 for (index = 0; index < NR_ARCH_IRQS; index++) {
146 seq_printf(p, "%s: ", irqclass_sub_desc[index].name); 175 seq_printf(p, "%s: ", irqclass_sub_desc[index].name);
147 irq = irqclass_sub_desc[index].irq; 176 irq = irqclass_sub_desc[index].irq;
diff --git a/arch/s390/pci/pci_irq.c b/arch/s390/pci/pci_irq.c
index 4bfd902f27f4..e7e3eab9a2b8 100644
--- a/arch/s390/pci/pci_irq.c
+++ b/arch/s390/pci/pci_irq.c
@@ -112,7 +112,7 @@ static int zpci_set_irq_affinity(struct irq_data *data, const struct cpumask *de
112} 112}
113 113
114static struct irq_chip zpci_irq_chip = { 114static struct irq_chip zpci_irq_chip = {
115 .name = "zPCI", 115 .name = "PCI-MSI",
116 .irq_unmask = pci_msi_unmask_irq, 116 .irq_unmask = pci_msi_unmask_irq,
117 .irq_mask = pci_msi_mask_irq, 117 .irq_mask = pci_msi_mask_irq,
118 .irq_set_affinity = zpci_set_irq_affinity, 118 .irq_set_affinity = zpci_set_irq_affinity,
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index de744ca158fd..18f5458f90e8 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -564,7 +564,7 @@ static irqreturn_t do_cio_interrupt(int irq, void *dummy)
564} 564}
565 565
566static struct irqaction io_interrupt = { 566static struct irqaction io_interrupt = {
567 .name = "IO", 567 .name = "I/O",
568 .handler = do_cio_interrupt, 568 .handler = do_cio_interrupt,
569}; 569};
570 570