* [4/4] NUMA-Q: remove last traces of bus number mangling
@ 2002-11-12 12:37 William Lee Irwin III
0 siblings, 0 replies; only message in thread
From: William Lee Irwin III @ 2002-11-12 12:37 UTC (permalink / raw)
To: linux-kernel
This removes the last vestiges of the bus number mangling and passes the
local bus numbers directly to the low-level PCI config cycle routines.
numa.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff -urpN pci-2.5.47-3/arch/i386/pci/numa.c pci-2.5.47-4/arch/i386/pci/numa.c
--- pci-2.5.47-3/arch/i386/pci/numa.c 2002-11-12 03:25:35.000000000 -0800
+++ pci-2.5.47-4/arch/i386/pci/numa.c 2002-11-12 03:32:13.000000000 -0800
@@ -10,8 +10,11 @@
#define BUS2LOCAL(global) (mp_bus_id_to_local[global])
#define QUADLOCAL2BUS(quad,local) (quad_local_to_mp_bus_id[quad][local])
+#define __PCI_CONF1_MQ_ADDRESS(bus, dev, fn, reg) \
+ (0x80000000 | (bus << 16) | (dev << 11) | (fn << 8) | (reg & ~3))
+
#define PCI_CONF1_MQ_ADDRESS(bus, dev, fn, reg) \
- (0x80000000 | (BUS2LOCAL(bus) << 16) | (dev << 11) | (fn << 8) | (reg & ~3))
+ __PCI_CONF1_MQ_ADDRESS(BUS2LOCAL(bus), dev, fn, reg)
static int bus2quad(struct pci_bus *bus)
{
@@ -27,7 +30,7 @@ static int __pci_conf1_mq_read (int seg,
spin_lock_irqsave(&pci_config_lock, flags);
- outl_quad(PCI_CONF1_MQ_ADDRESS(bus, dev, fn, reg), 0xCF8, seg);
+ outl_quad(__PCI_CONF1_MQ_ADDRESS(bus, dev, fn, reg), 0xCF8, seg);
switch (len) {
case 1:
@@ -55,7 +58,7 @@ static int __pci_conf1_mq_write (int seg
spin_lock_irqsave(&pci_config_lock, flags);
- outl_quad(PCI_CONF1_MQ_ADDRESS(bus, dev, fn, reg), 0xCF8, seg);
+ outl_quad(__PCI_CONF1_MQ_ADDRESS(bus, dev, fn, reg), 0xCF8, seg);
switch (len) {
case 1:
@@ -111,9 +114,9 @@ static void __devinit pci_fixup_i450nx(s
pci_read_config_byte(d, reg++, &subb);
DBG("i450NX PXB %d: %02x/%02x/%02x\n", pxb, busno, suba, subb);
if (busno)
- pci_scan_bus(QUADLOCAL2BUS(quad,busno), pci_root_ops, (void *)quad); /* Bus A */
+ pci_scan_bus(busno, pci_root_ops, (void *)quad); /* Bus A */
if (suba < subb)
- pci_scan_bus(QUADLOCAL2BUS(quad,suba+1), pci_root_ops, (void *)quad); /* Bus B */
+ pci_scan_bus(suba+1, pci_root_ops, (void *)quad); /* Bus B */
}
pcibios_last_bus = -1;
}
@@ -134,10 +137,8 @@ static int __init pci_numa_init(void)
pci_root_bus = pcibios_scan_root(0);
if (clustered_apic_mode && (numnodes > 1)) {
for (quad = 1; quad < numnodes; ++quad) {
- printk("Scanning PCI bus %d for quad %d\n",
- QUADLOCAL2BUS(quad,0), quad);
- pci_scan_bus(QUADLOCAL2BUS(quad,0),
- pci_root_ops, (void *)quad);
+ printk("Scanning PCI bus %d for quad %d\n", 0, quad);
+ pci_scan_bus(0, pci_root_ops, (void *)quad);
}
}
return 0;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-11-12 12:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-12 12:37 [4/4] NUMA-Q: remove last traces of bus number mangling William Lee Irwin III
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®