[S390] chsc_sch: add support for irq statistics
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Sun, 30 Oct 2011 14:16:54 +0000 (15:16 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Sun, 30 Oct 2011 14:16:44 +0000 (15:16 +0100)
Add support for CHSC I/O interrupt statistics in /proc/interrupts.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/irq.h
arch/s390/kernel/irq.c
drivers/s390/cio/chsc_sch.c

index 1f686059f2938c6ff8692fe3d4a8a0c221505e94..eadfa9fc03ba2eae21d4afab80dc2de67a93c835 100644 (file)
@@ -28,6 +28,7 @@ enum interruption_class {
        IOINT_CLW,
        IOINT_CTC,
        IOINT_APB,
+       IOINT_CSC,
        NMI_NMI,
        NR_IRQS,
 };
index d382f9db3df5fa52e9c95fc531f9c1baed0f42fb..30faaef34457ea5237d68ebd5590573546268685 100644 (file)
@@ -53,6 +53,7 @@ static const struct irq_class intrclass_names[] = {
        {.name = "CLW", .desc = "[I/O] CLAW" },
        {.name = "CTC", .desc = "[I/O] CTC" },
        {.name = "APB", .desc = "[I/O] AP Bus" },
+       {.name = "CSC", .desc = "[I/O] CHSC Subchannel" },
        {.name = "NMI", .desc = "[NMI] Machine Check" },
 };
 
index e950f1ad4dd121934551c02673801aa3fa82daa5..0c87b0fc7714b42f3dedec1e1adc1035c2f96877 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Driver for s390 chsc subchannels
  *
- * Copyright IBM Corp. 2008, 2009
+ * Copyright IBM Corp. 2008, 2011
  *
  * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
  *
@@ -12,6 +12,7 @@
 #include <linux/module.h>
 #include <linux/uaccess.h>
 #include <linux/miscdevice.h>
+#include <linux/kernel_stat.h>
 
 #include <asm/compat.h>
 #include <asm/cio.h>
@@ -56,6 +57,8 @@ static void chsc_subchannel_irq(struct subchannel *sch)
 
        CHSC_LOG(4, "irb");
        CHSC_LOG_HEX(4, irb, sizeof(*irb));
+       kstat_cpu(smp_processor_id()).irqs[IOINT_CSC]++;
+
        /* Copy irb to provided request and set done. */
        if (!request) {
                CHSC_MSG(0, "Interrupt on sch 0.%x.%04x with no request\n",