diff options
| -rw-r--r-- | arch/alpha/kernel/core_marvel.c | 2 | ||||
| -rw-r--r-- | arch/alpha/kernel/core_mcpcia.c | 2 | ||||
| -rw-r--r-- | arch/alpha/kernel/core_tsunami.c | 2 | ||||
| -rw-r--r-- | arch/alpha/kernel/core_wildfire.c | 2 | ||||
| -rw-r--r-- | arch/alpha/kernel/pci.c | 15 | ||||
| -rw-r--r-- | arch/alpha/kernel/sys_dp264.c | 2 | ||||
| -rw-r--r-- | arch/alpha/kernel/sys_nautilus.c | 1 | ||||
| -rw-r--r-- | include/asm-alpha/pci.h | 14 |
8 files changed, 22 insertions, 18 deletions
diff --git a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c index 52d27b27ebe5..705eb73b33ae 100644 --- a/arch/alpha/kernel/core_marvel.c +++ b/arch/alpha/kernel/core_marvel.c @@ -524,7 +524,7 @@ mk_conf_addr(struct pci_bus *pbus, unsigned int devfn, int where) if (!io7_port->enabled) return addr; - if (hose->first_busno == bus) { + if (hose->bus == pbus) { /* Don't support idsel > 20 on primary bus. */ if (devfn >= PCI_DEVFN(21, 0)) return addr; diff --git a/arch/alpha/kernel/core_mcpcia.c b/arch/alpha/kernel/core_mcpcia.c index 6dbf404aa549..015cac37e053 100644 --- a/arch/alpha/kernel/core_mcpcia.c +++ b/arch/alpha/kernel/core_mcpcia.c @@ -185,7 +185,7 @@ mk_conf_addr(struct pci_bus *pbus, unsigned int devfn, int where, /* Type 1 configuration cycle for *ALL* busses. */ *type1 = 1; - if (bus == hose->first_busno) + if (hose->bus == pbus) bus = 0; addr = (bus << 16) | (devfn << 8) | (where); addr <<= 5; /* swizzle for SPARSE */ diff --git a/arch/alpha/kernel/core_tsunami.c b/arch/alpha/kernel/core_tsunami.c index de1565887da3..ba0207a28d5c 100644 --- a/arch/alpha/kernel/core_tsunami.c +++ b/arch/alpha/kernel/core_tsunami.c @@ -101,7 +101,7 @@ mk_conf_addr(struct pci_bus *pbus, unsigned int device_fn, int where, "pci_addr=0x%p, type1=0x%p)\n", bus, device_fn, where, pci_addr, type1)); - if (hose->first_busno == bus) + if (hose->bus == pbus) bus = 0; *type1 = (bus != 0); diff --git a/arch/alpha/kernel/core_wildfire.c b/arch/alpha/kernel/core_wildfire.c index ea9d546afcda..aa4717e880be 100644 --- a/arch/alpha/kernel/core_wildfire.c +++ b/arch/alpha/kernel/core_wildfire.c @@ -367,7 +367,7 @@ mk_conf_addr(struct pci_bus *pbus, unsigned int device_fn, int where, "pci_addr=0x%p, type1=0x%p)\n", bus, device_fn, where, pci_addr, type1)); - if (hose->first_busno == bus) + if (hose->bus == pbus) bus = 0; *type1 = (bus != 0); diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c index 1fcc0ac7312e..97028300b931 100644 --- a/arch/alpha/kernel/pci.c +++ b/arch/alpha/kernel/pci.c @@ -280,7 +280,7 @@ common_swizzle(struct pci_dev *dev, u8 *pinp) { struct pci_controller *hose = dev->sysdata; - if (dev->bus->number != hose->first_busno) { + if (dev->bus != hose->bus) { u8 pin = *pinp; do { pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn)); @@ -398,15 +398,20 @@ common_init_pci(void) struct pci_controller *hose; struct pci_bus *bus; int next_busno; + int need_domain_info = 0; /* Scan all of the recorded PCI controllers. */ for (next_busno = 0, hose = hose_head; hose; hose = hose->next) { - hose->first_busno = next_busno; - hose->last_busno = 0xff; bus = pci_scan_bus(next_busno, alpha_mv.pci_ops, hose); hose->bus = bus; - next_busno = hose->last_busno = bus->subordinate; - next_busno += 1; + hose->need_domain_info = need_domain_info; + next_busno = bus->subordinate + 1; + /* Don't allow 8-bit bus number overflow inside the hose - + reserve some space for bridges. */ + if (next_busno > 224) { + next_busno = 0; + need_domain_info = 1; + } } if (pci_probe_only) diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c index 0b77aa68722a..4437cf42dd9c 100644 --- a/arch/alpha/kernel/sys_dp264.c +++ b/arch/alpha/kernel/sys_dp264.c @@ -463,7 +463,7 @@ monet_swizzle(struct pci_dev *dev, u8 *pinp) struct pci_controller *hose = dev->sysdata; int slot, pin = *pinp; - if (hose->first_busno == dev->bus->number) { + if (hose->bus == dev->bus) { slot = PCI_SLOT(dev->devfn); } /* Check for the built-in bridge on hose 1. */ diff --git a/arch/alpha/kernel/sys_nautilus.c b/arch/alpha/kernel/sys_nautilus.c index 53bbe02b4246..32bfb659fbfb 100644 --- a/arch/alpha/kernel/sys_nautilus.c +++ b/arch/alpha/kernel/sys_nautilus.c @@ -200,7 +200,6 @@ nautilus_init_pci(void) /* Scan our single hose. */ bus = pci_scan_bus(0, alpha_mv.pci_ops, hose); hose->bus = bus; - hose->last_busno = bus->subordinate; irongate = pci_find_slot(0, 0); bus->self = irongate; diff --git a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h index b203d40b9282..2289a5350d41 100644 --- a/include/asm-alpha/pci.h +++ b/include/asm-alpha/pci.h @@ -37,8 +37,9 @@ struct pci_controller { unsigned long config_space_base; unsigned int index; - unsigned int first_busno; - unsigned int last_busno; + /* For compatibility with current (as of July 2003) pciutils + and XFree86. Eventually will be removed. */ + unsigned int need_domain_info; struct pci_iommu_arena *sg_pci; struct pci_iommu_arena *sg_isa; @@ -194,15 +195,14 @@ pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index -/* Bus number == domain number until we get above 256 busses */ static inline int pci_name_bus(char *name, struct pci_bus *bus) { - int domain = pci_domain_nr(bus); + struct pci_controller *hose = bus->sysdata; - if (domain < 256) { - sprintf(name, "%02x", domain); + if (likely(hose->need_domain_info == 0)) { + sprintf(name, "%02x", bus->number); } else { - sprintf(name, "%04x:%02x", domain, bus->number); + sprintf(name, "%04x:%02x", hose->index, bus->number); } return 0; } |
