Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/pci: remove per device debug attribute

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>

-43
-1
arch/s390/include/asm/pci.h
··· 120 120 121 121 struct dentry *debugfs_dev; 122 122 struct dentry *debugfs_perf; 123 - struct dentry *debugfs_debug; 124 123 }; 125 124 126 125 struct pci_hp_callback_ops {
-13
arch/s390/pci/pci.c
··· 85 85 /* Adapter local summary indicator */ 86 86 static u8 *zpci_irq_si; 87 87 88 - static atomic_t irq_retries = ATOMIC_INIT(0); 89 - 90 88 /* I/O Map */ 91 89 static DEFINE_SPINLOCK(zpci_iomap_lock); 92 90 static DECLARE_BITMAP(zpci_iomap, ZPCI_IOMAP_MAX_ENTRIES); ··· 450 452 max = aisb_max; 451 453 sbit = find_first_bit_left(bucket->aisb, max); 452 454 if (sbit != max) { 453 - atomic_inc(&irq_retries); 454 455 rescan++; 455 456 goto scan; 456 457 } ··· 746 749 s390_unregister_adapter_interrupt(zpci_irq_si, PCI_ISC); 747 750 isc_unregister(PCI_ISC); 748 751 kfree(bucket); 749 - } 750 - 751 - void zpci_debug_info(struct zpci_dev *zdev, struct seq_file *m) 752 - { 753 - if (!zdev) 754 - return; 755 - 756 - seq_printf(m, "global irq retries: %u\n", atomic_read(&irq_retries)); 757 - seq_printf(m, "aibv[0]:%016lx aibv[1]:%016lx aisb:%016lx\n", 758 - get_imap(0)->aibv, get_imap(1)->aibv, *bucket->aisb); 759 752 } 760 753 761 754 static struct resource *zpci_alloc_bus_resource(unsigned long start, unsigned long size,
-29
arch/s390/pci/pci_debug.c
··· 115 115 .release = single_release, 116 116 }; 117 117 118 - static int pci_debug_show(struct seq_file *m, void *v) 119 - { 120 - struct zpci_dev *zdev = m->private; 121 - 122 - zpci_debug_info(zdev, m); 123 - return 0; 124 - } 125 - 126 - static int pci_debug_seq_open(struct inode *inode, struct file *filp) 127 - { 128 - return single_open(filp, pci_debug_show, 129 - file_inode(filp)->i_private); 130 - } 131 - 132 - static const struct file_operations debugfs_pci_debug_fops = { 133 - .open = pci_debug_seq_open, 134 - .read = seq_read, 135 - .llseek = seq_lseek, 136 - .release = single_release, 137 - }; 138 - 139 118 void zpci_debug_init_device(struct zpci_dev *zdev) 140 119 { 141 120 zdev->debugfs_dev = debugfs_create_dir(dev_name(&zdev->pdev->dev), ··· 128 149 &debugfs_pci_perf_fops); 129 150 if (IS_ERR(zdev->debugfs_perf)) 130 151 zdev->debugfs_perf = NULL; 131 - 132 - zdev->debugfs_debug = debugfs_create_file("debug", 133 - S_IFREG | S_IRUGO | S_IWUSR, 134 - zdev->debugfs_dev, zdev, 135 - &debugfs_pci_debug_fops); 136 - if (IS_ERR(zdev->debugfs_debug)) 137 - zdev->debugfs_debug = NULL; 138 152 } 139 153 140 154 void zpci_debug_exit_device(struct zpci_dev *zdev) 141 155 { 142 156 debugfs_remove(zdev->debugfs_perf); 143 - debugfs_remove(zdev->debugfs_debug); 144 157 debugfs_remove(zdev->debugfs_dev); 145 158 } 146 159