2005-01-07 19:56:05

by Bjorn Helgaas

[permalink] [raw]
Subject: [PATCH] use modern format for PCI->APIC IRQ transform printks

Use pci_name() rather than "(B%d,I%d,P%d)" when printing PCI
IRQ information. Compiled but untested.

Signed-off-by: Bjorn Helgaas <[email protected]>

===== arch/i386/pci/irq.c 1.53 vs edited =====
--- 1.53/arch/i386/pci/irq.c 2004-12-30 16:22:56 -07:00
+++ edited/arch/i386/pci/irq.c 2005-01-07 11:11:11 -07:00
@@ -735,7 +735,7 @@
if (!pirq_table)
return 0;

- DBG("IRQ for %s:%d", pci_name(dev), pin);
+ DBG("IRQ for %s[%c]", pci_name(dev), 'A' + pin);
info = pirq_get_info(dev);
if (!info) {
DBG(" -> not found in routing table\n");
@@ -892,16 +892,16 @@
irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number,
PCI_SLOT(bridge->devfn), pin);
if (irq >= 0)
- printk(KERN_WARNING "PCI: using PPB(B%d,I%d,P%d) to get irq %d\n",
- bridge->bus->number, PCI_SLOT(bridge->devfn), pin, irq);
+ printk(KERN_WARNING "PCI: using PPB %s[%c] to get irq %d\n",
+ pci_name(bridge), 'A' + pin, irq);
}
if (irq >= 0) {
if (use_pci_vector() &&
!platform_legacy_irq(irq))
irq = IO_APIC_VECTOR(irq);

- printk(KERN_INFO "PCI->APIC IRQ transform: (B%d,I%d,P%d) -> %d\n",
- dev->bus->number, PCI_SLOT(dev->devfn), pin, irq);
+ printk(KERN_INFO "PCI->APIC IRQ transform: %s[%c] -> IRQ %d\n",
+ pci_name(dev), 'A' + pin, irq);
dev->irq = irq;
}
}
@@ -1051,8 +1051,8 @@
irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number,
PCI_SLOT(bridge->devfn), pin);
if (irq >= 0)
- printk(KERN_WARNING "PCI: using PPB(B%d,I%d,P%d) to get irq %d\n",
- bridge->bus->number, PCI_SLOT(bridge->devfn), pin, irq);
+ printk(KERN_WARNING "PCI: using PPB %s[%c] to get irq %d\n",
+ pci_name(bridge), 'A' + pin, irq);
dev = bridge;
}
dev = temp_dev;
@@ -1061,8 +1061,8 @@
if (!platform_legacy_irq(irq))
irq = IO_APIC_VECTOR(irq);
#endif
- printk(KERN_INFO "PCI->APIC IRQ transform: (B%d,I%d,P%d) -> %d\n",
- dev->bus->number, PCI_SLOT(dev->devfn), pin, irq);
+ printk(KERN_INFO "PCI->APIC IRQ transform: %s[%c] -> IRQ %d\n",
+ pci_name(dev), 'A' + pin, irq);
dev->irq = irq;
return 0;
} else