s390/pci: remove per device debug attribute
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 19 Jun 2013 12:26:46 +0000 (14:26 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 26 Jun 2013 19:10:27 +0000 (21:10 +0200)
The per-pci-device 'debug' attribute is ill defined. For each device
it prints the same information, the adapter interrupt bit vector for
irq numbers 0 & 1, the start of the global interrupt summary vector
and the global irq retries counter. Just remove the attribute and
the associated code.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/pci.h
arch/s390/pci/pci.c
arch/s390/pci/pci_debug.c

index be41f4f885ce21bc434c2bf767248341b26d9c77..6e577ba0e5daa12256590018dfeddb4071a1e892 100644 (file)
@@ -120,7 +120,6 @@ struct zpci_dev {
 
        struct dentry   *debugfs_dev;
        struct dentry   *debugfs_perf;
-       struct dentry   *debugfs_debug;
 };
 
 struct pci_hp_callback_ops {
index 628769b91b97acd434e0cba1cec115497cc2a4f6..51c3ca86bd05cc2d28fcd7870766981917a71079 100644 (file)
@@ -85,8 +85,6 @@ static struct intr_bucket *bucket;
 /* Adapter local summary indicator */
 static u8 *zpci_irq_si;
 
-static atomic_t irq_retries = ATOMIC_INIT(0);
-
 /* I/O Map */
 static DEFINE_SPINLOCK(zpci_iomap_lock);
 static DECLARE_BITMAP(zpci_iomap, ZPCI_IOMAP_MAX_ENTRIES);
@@ -452,7 +450,6 @@ scan:
        max = aisb_max;
        sbit = find_first_bit_left(bucket->aisb, max);
        if (sbit != max) {
-               atomic_inc(&irq_retries);
                rescan++;
                goto scan;
        }
@@ -751,16 +748,6 @@ static void zpci_irq_exit(void)
        kfree(bucket);
 }
 
-void zpci_debug_info(struct zpci_dev *zdev, struct seq_file *m)
-{
-       if (!zdev)
-               return;
-
-       seq_printf(m, "global irq retries: %u\n", atomic_read(&irq_retries));
-       seq_printf(m, "aibv[0]:%016lx  aibv[1]:%016lx  aisb:%016lx\n",
-                  get_imap(0)->aibv, get_imap(1)->aibv, *bucket->aisb);
-}
-
 static struct resource *zpci_alloc_bus_resource(unsigned long start, unsigned long size,
                                                unsigned long flags, int domain)
 {
index 771b82359af421b1a213b276b39bbe0b8d84c5a6..75c69b402e05aa3ca12f3b7ee8ca78864886c1b4 100644 (file)
@@ -115,27 +115,6 @@ static const struct file_operations debugfs_pci_perf_fops = {
        .release = single_release,
 };
 
-static int pci_debug_show(struct seq_file *m, void *v)
-{
-       struct zpci_dev *zdev = m->private;
-
-       zpci_debug_info(zdev, m);
-       return 0;
-}
-
-static int pci_debug_seq_open(struct inode *inode, struct file *filp)
-{
-       return single_open(filp, pci_debug_show,
-                          file_inode(filp)->i_private);
-}
-
-static const struct file_operations debugfs_pci_debug_fops = {
-       .open    = pci_debug_seq_open,
-       .read    = seq_read,
-       .llseek  = seq_lseek,
-       .release = single_release,
-};
-
 void zpci_debug_init_device(struct zpci_dev *zdev)
 {
        zdev->debugfs_dev = debugfs_create_dir(dev_name(&zdev->pdev->dev),
@@ -149,19 +128,11 @@ void zpci_debug_init_device(struct zpci_dev *zdev)
                                &debugfs_pci_perf_fops);
        if (IS_ERR(zdev->debugfs_perf))
                zdev->debugfs_perf = NULL;
-
-       zdev->debugfs_debug = debugfs_create_file("debug",
-                               S_IFREG | S_IRUGO | S_IWUSR,
-                               zdev->debugfs_dev, zdev,
-                               &debugfs_pci_debug_fops);
-       if (IS_ERR(zdev->debugfs_debug))
-               zdev->debugfs_debug = NULL;
 }
 
 void zpci_debug_exit_device(struct zpci_dev *zdev)
 {
        debugfs_remove(zdev->debugfs_perf);
-       debugfs_remove(zdev->debugfs_debug);
        debugfs_remove(zdev->debugfs_dev);
 }