mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
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>
This commit is contained in:
parent
e979ce7bce
commit
914b7dd07e
@ -47,7 +47,6 @@ enum interruption_class {
|
||||
IRQEXT_CMC,
|
||||
IRQEXT_FTP,
|
||||
IRQIO_CIO,
|
||||
IRQIO_QAI,
|
||||
IRQIO_DAS,
|
||||
IRQIO_C15,
|
||||
IRQIO_C70,
|
||||
@ -55,12 +54,13 @@ enum interruption_class {
|
||||
IRQIO_VMR,
|
||||
IRQIO_LCS,
|
||||
IRQIO_CTC,
|
||||
IRQIO_APB,
|
||||
IRQIO_ADM,
|
||||
IRQIO_CSC,
|
||||
IRQIO_VIR,
|
||||
IRQIO_QAI,
|
||||
IRQIO_APB,
|
||||
IRQIO_PCI,
|
||||
IRQIO_MSI,
|
||||
IRQIO_VIR,
|
||||
IRQIO_VAI,
|
||||
IRQIO_GAL,
|
||||
NMI_NMI,
|
||||
|
@ -73,7 +73,6 @@ static const struct irq_class irqclass_sub_desc[] = {
|
||||
{.irq = IRQEXT_CMC, .name = "CMC", .desc = "[EXT] CPU-Measurement: Counter"},
|
||||
{.irq = IRQEXT_FTP, .name = "FTP", .desc = "[EXT] HMC FTP Service"},
|
||||
{.irq = IRQIO_CIO, .name = "CIO", .desc = "[I/O] Common I/O Layer Interrupt"},
|
||||
{.irq = IRQIO_QAI, .name = "QAI", .desc = "[I/O] QDIO Adapter Interrupt"},
|
||||
{.irq = IRQIO_DAS, .name = "DAS", .desc = "[I/O] DASD"},
|
||||
{.irq = IRQIO_C15, .name = "C15", .desc = "[I/O] 3215"},
|
||||
{.irq = IRQIO_C70, .name = "C70", .desc = "[I/O] 3270"},
|
||||
@ -81,14 +80,15 @@ static const struct irq_class irqclass_sub_desc[] = {
|
||||
{.irq = IRQIO_VMR, .name = "VMR", .desc = "[I/O] Unit Record Devices"},
|
||||
{.irq = IRQIO_LCS, .name = "LCS", .desc = "[I/O] LCS"},
|
||||
{.irq = IRQIO_CTC, .name = "CTC", .desc = "[I/O] CTC"},
|
||||
{.irq = IRQIO_APB, .name = "APB", .desc = "[I/O] AP Bus"},
|
||||
{.irq = IRQIO_ADM, .name = "ADM", .desc = "[I/O] EADM Subchannel"},
|
||||
{.irq = IRQIO_CSC, .name = "CSC", .desc = "[I/O] CHSC Subchannel"},
|
||||
{.irq = IRQIO_PCI, .name = "PCI", .desc = "[I/O] PCI Interrupt" },
|
||||
{.irq = IRQIO_MSI, .name = "MSI", .desc = "[I/O] MSI Interrupt" },
|
||||
{.irq = IRQIO_VIR, .name = "VIR", .desc = "[I/O] Virtual I/O Devices"},
|
||||
{.irq = IRQIO_VAI, .name = "VAI", .desc = "[I/O] Virtual I/O Devices AI"},
|
||||
{.irq = IRQIO_GAL, .name = "GAL", .desc = "[I/O] GIB Alert"},
|
||||
{.irq = IRQIO_QAI, .name = "QAI", .desc = "[AIO] QDIO Adapter Interrupt"},
|
||||
{.irq = IRQIO_APB, .name = "APB", .desc = "[AIO] AP Bus"},
|
||||
{.irq = IRQIO_PCI, .name = "PCI", .desc = "[AIO] PCI Interrupt"},
|
||||
{.irq = IRQIO_MSI, .name = "MSI", .desc = "[AIO] MSI Interrupt"},
|
||||
{.irq = IRQIO_VAI, .name = "VAI", .desc = "[AIO] Virtual I/O Devices AI"},
|
||||
{.irq = IRQIO_GAL, .name = "GAL", .desc = "[AIO] GIB Alert"},
|
||||
{.irq = NMI_NMI, .name = "NMI", .desc = "[NMI] Machine Check"},
|
||||
{.irq = CPU_RST, .name = "RST", .desc = "[CPU] CPU Restart"},
|
||||
};
|
||||
@ -116,6 +116,34 @@ void do_IRQ(struct pt_regs *regs, int irq)
|
||||
set_irq_regs(old_regs);
|
||||
}
|
||||
|
||||
static void show_msi_interrupt(struct seq_file *p, int irq)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
unsigned long flags;
|
||||
int cpu;
|
||||
|
||||
irq_lock_sparse();
|
||||
desc = irq_to_desc(irq);
|
||||
if (!desc)
|
||||
goto out;
|
||||
|
||||
raw_spin_lock_irqsave(&desc->lock, flags);
|
||||
seq_printf(p, "%3d: ", irq);
|
||||
for_each_online_cpu(cpu)
|
||||
seq_printf(p, "%10u ", kstat_irqs_cpu(irq, cpu));
|
||||
|
||||
if (desc->irq_data.chip)
|
||||
seq_printf(p, " %8s", desc->irq_data.chip->name);
|
||||
|
||||
if (desc->action)
|
||||
seq_printf(p, " %s", desc->action->name);
|
||||
|
||||
seq_putc(p, '\n');
|
||||
raw_spin_unlock_irqrestore(&desc->lock, flags);
|
||||
out:
|
||||
irq_unlock_sparse();
|
||||
}
|
||||
|
||||
/*
|
||||
* show_interrupts is needed by /proc/interrupts.
|
||||
*/
|
||||
@ -128,7 +156,7 @@ int show_interrupts(struct seq_file *p, void *v)
|
||||
if (index == 0) {
|
||||
seq_puts(p, " ");
|
||||
for_each_online_cpu(cpu)
|
||||
seq_printf(p, "CPU%d ", cpu);
|
||||
seq_printf(p, "CPU%-8d", cpu);
|
||||
seq_putc(p, '\n');
|
||||
}
|
||||
if (index < NR_IRQS_BASE) {
|
||||
@ -139,9 +167,10 @@ int show_interrupts(struct seq_file *p, void *v)
|
||||
seq_putc(p, '\n');
|
||||
goto out;
|
||||
}
|
||||
if (index > NR_IRQS_BASE)
|
||||
if (index < nr_irqs) {
|
||||
show_msi_interrupt(p, index);
|
||||
goto out;
|
||||
|
||||
}
|
||||
for (index = 0; index < NR_ARCH_IRQS; index++) {
|
||||
seq_printf(p, "%s: ", irqclass_sub_desc[index].name);
|
||||
irq = irqclass_sub_desc[index].irq;
|
||||
|
@ -112,7 +112,7 @@ static int zpci_set_irq_affinity(struct irq_data *data, const struct cpumask *de
|
||||
}
|
||||
|
||||
static struct irq_chip zpci_irq_chip = {
|
||||
.name = "zPCI",
|
||||
.name = "PCI-MSI",
|
||||
.irq_unmask = pci_msi_unmask_irq,
|
||||
.irq_mask = pci_msi_mask_irq,
|
||||
.irq_set_affinity = zpci_set_irq_affinity,
|
||||
|
@ -564,7 +564,7 @@ static irqreturn_t do_cio_interrupt(int irq, void *dummy)
|
||||
}
|
||||
|
||||
static struct irqaction io_interrupt = {
|
||||
.name = "IO",
|
||||
.name = "I/O",
|
||||
.handler = do_cio_interrupt,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user