Skip to content

Commit 914b7dd

Browse files
Sebastian OttMartin Schwidefsky
authored andcommitted
s390: show statistics for MSI IRQs
Improve /proc/interrupts on s390 to show statistics for individual MSI interrupts. Signed-off-by: Sebastian Ott <[email protected]> Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
1 parent e979ce7 commit 914b7dd

File tree

4 files changed

+43
-14
lines changed

4 files changed

+43
-14
lines changed

arch/s390/include/asm/irq.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,20 @@ enum interruption_class {
4747
IRQEXT_CMC,
4848
IRQEXT_FTP,
4949
IRQIO_CIO,
50-
IRQIO_QAI,
5150
IRQIO_DAS,
5251
IRQIO_C15,
5352
IRQIO_C70,
5453
IRQIO_TAP,
5554
IRQIO_VMR,
5655
IRQIO_LCS,
5756
IRQIO_CTC,
58-
IRQIO_APB,
5957
IRQIO_ADM,
6058
IRQIO_CSC,
59+
IRQIO_VIR,
60+
IRQIO_QAI,
61+
IRQIO_APB,
6162
IRQIO_PCI,
6263
IRQIO_MSI,
63-
IRQIO_VIR,
6464
IRQIO_VAI,
6565
IRQIO_GAL,
6666
NMI_NMI,

arch/s390/kernel/irq.c

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,22 @@ static const struct irq_class irqclass_sub_desc[] = {
7373
{.irq = IRQEXT_CMC, .name = "CMC", .desc = "[EXT] CPU-Measurement: Counter"},
7474
{.irq = IRQEXT_FTP, .name = "FTP", .desc = "[EXT] HMC FTP Service"},
7575
{.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"},
7776
{.irq = IRQIO_DAS, .name = "DAS", .desc = "[I/O] DASD"},
7877
{.irq = IRQIO_C15, .name = "C15", .desc = "[I/O] 3215"},
7978
{.irq = IRQIO_C70, .name = "C70", .desc = "[I/O] 3270"},
8079
{.irq = IRQIO_TAP, .name = "TAP", .desc = "[I/O] Tape"},
8180
{.irq = IRQIO_VMR, .name = "VMR", .desc = "[I/O] Unit Record Devices"},
8281
{.irq = IRQIO_LCS, .name = "LCS", .desc = "[I/O] LCS"},
8382
{.irq = IRQIO_CTC, .name = "CTC", .desc = "[I/O] CTC"},
84-
{.irq = IRQIO_APB, .name = "APB", .desc = "[I/O] AP Bus"},
8583
{.irq = IRQIO_ADM, .name = "ADM", .desc = "[I/O] EADM Subchannel"},
8684
{.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" },
8985
{.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"},
91-
{.irq = IRQIO_GAL, .name = "GAL", .desc = "[I/O] GIB Alert"},
86+
{.irq = IRQIO_QAI, .name = "QAI", .desc = "[AIO] QDIO Adapter Interrupt"},
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"},
9292
{.irq = NMI_NMI, .name = "NMI", .desc = "[NMI] Machine Check"},
9393
{.irq = CPU_RST, .name = "RST", .desc = "[CPU] CPU Restart"},
9494
};
@@ -116,6 +116,34 @@ void do_IRQ(struct pt_regs *regs, int irq)
116116
set_irq_regs(old_regs);
117117
}
118118

119+
static 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);
143+
out:
144+
irq_unlock_sparse();
145+
}
146+
119147
/*
120148
* show_interrupts is needed by /proc/interrupts.
121149
*/
@@ -128,7 +156,7 @@ int show_interrupts(struct seq_file *p, void *v)
128156
if (index == 0) {
129157
seq_puts(p, " ");
130158
for_each_online_cpu(cpu)
131-
seq_printf(p, "CPU%d ", cpu);
159+
seq_printf(p, "CPU%-8d", cpu);
132160
seq_putc(p, '\n');
133161
}
134162
if (index < NR_IRQS_BASE) {
@@ -139,9 +167,10 @@ int show_interrupts(struct seq_file *p, void *v)
139167
seq_putc(p, '\n');
140168
goto out;
141169
}
142-
if (index > NR_IRQS_BASE)
170+
if (index < nr_irqs) {
171+
show_msi_interrupt(p, index);
143172
goto out;
144-
173+
}
145174
for (index = 0; index < NR_ARCH_IRQS; index++) {
146175
seq_printf(p, "%s: ", irqclass_sub_desc[index].name);
147176
irq = irqclass_sub_desc[index].irq;

arch/s390/pci/pci_irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static int zpci_set_irq_affinity(struct irq_data *data, const struct cpumask *de
112112
}
113113

114114
static struct irq_chip zpci_irq_chip = {
115-
.name = "zPCI",
115+
.name = "PCI-MSI",
116116
.irq_unmask = pci_msi_unmask_irq,
117117
.irq_mask = pci_msi_mask_irq,
118118
.irq_set_affinity = zpci_set_irq_affinity,

drivers/s390/cio/cio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ static irqreturn_t do_cio_interrupt(int irq, void *dummy)
564564
}
565565

566566
static struct irqaction io_interrupt = {
567-
.name = "IO",
567+
.name = "I/O",
568568
.handler = do_cio_interrupt,
569569
};
570570

0 commit comments

Comments
 (0)