NUMA-Q: remove last traces of bus number mangling

NUMA-Q: remove last traces of bus number mangling

Post by William Lee Irwin II » Wed, 13 Nov 2002 14:50:09



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

 #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)

        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) {

        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) {

                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;

        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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. NUMA-Q: remove PCI bus number mangling

This fixes a longstanding bug with respect to bridge handling as well as
a Linux PCI faux pas, namely an attempt to support PCI domains with bus
number mangling.

The end result is that bridges off of quad 0 now work, and the code now
follows Linux PCI conventions.

[1/4] NUMA-Q: use sysdata as quad numbers in pci_scan_bus()"
[2/4] NUMA-Q: fetch quad numbers from struct pci_bus"
[3/4] NUMA-Q: use quad numbers passed to low-level config cycles"
[4/4] NUMA-Q: remove last traces of bus number mangling"

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Scanners under linux (parallel port)

3. Patch to enable PCI buses on all nodes of NUMA-Q

4. Serial setup problem

5. NUMA-Q: use sysdata as quad numbers in pci_scan_bus()

6. Anyone using Linux on Dragonball eval board?

7. remove the last trace of B_FREE

8. Netscape 3.00 and Netscape 3.01 crashes with Bus Error.

9. NUMA-Q: fetch quad numbers from struct pci_bus

10. NUMA-Q: use quad numbers passed to low-level PCI config helpers

11. Removing last character from last line in a file

12. last login informations mangled ?

13. mangled isapnp IDs in /proc/bus/isapnp/devices