[S390] tape: add support for irq statistics
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 5 Jan 2011 11:47:33 +0000 (12:47 +0100)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Wed, 5 Jan 2011 11:47:25 +0000 (12:47 +0100)
Add support for ccw based tape I/O interrupt statistics in /proc/interrupts.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/irq.h
arch/s390/kernel/irq.c
drivers/s390/char/tape_core.c

index 65e63c02b0f92e4602c08c648c8c0ccf5adf5e52..6986343a566f3c128c9543ee6d48fa49dfe6a6f9 100644 (file)
@@ -20,6 +20,7 @@ enum interruption_class {
        IOINT_DAS,
        IOINT_C15,
        IOINT_C70,
+       IOINT_TAP,
        NMI_NMI,
        NR_IRQS,
 };
index 8c241416576f3506c38a3a46dc6d63903a974a9a..5d7b6fbb3c13f8398856237707f196c65dad6679 100644 (file)
@@ -37,6 +37,7 @@ static const struct irq_class intrclass_names[] = {
        {.name = "DAS", .desc = "[I/O] DASD" },
        {.name = "C15", .desc = "[I/O] 3215" },
        {.name = "C70", .desc = "[I/O] 3270" },
+       {.name = "TAP", .desc = "[I/O] Tape" },
        {.name = "NMI", .desc = "[NMI] Machine Check" },
 };
 
index b3a3e8e8656e6db1be5e3a50b63056c43f0897f6..7978a0adeaf3cd2781216d5c2d0fb13724282506 100644 (file)
@@ -14,6 +14,7 @@
 #define KMSG_COMPONENT "tape"
 #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
 
+#include <linux/kernel_stat.h>
 #include <linux/module.h>
 #include <linux/init.h>             // for kernel parameters
 #include <linux/kmod.h>             // for requesting modules
@@ -1114,6 +1115,7 @@ __tape_do_irq (struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
        struct tape_request *request;
        int rc;
 
+       kstat_cpu(smp_processor_id()).irqs[IOINT_TAP]++;
        device = dev_get_drvdata(&cdev->dev);
        if (device == NULL) {
                return;