diff options
31 files changed, 117 insertions, 117 deletions
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c index 1a629636cc16..53229a496311 100644 --- a/arch/alpha/kernel/pci.c +++ b/arch/alpha/kernel/pci.c | |||
@@ -359,7 +359,7 @@ common_init_pci(void) | |||
359 | hose, &resources); | 359 | hose, &resources); |
360 | hose->bus = bus; | 360 | hose->bus = bus; |
361 | hose->need_domain_info = need_domain_info; | 361 | hose->need_domain_info = need_domain_info; |
362 | next_busno = bus->subordinate + 1; | 362 | next_busno = bus->busn_res.end + 1; |
363 | /* Don't allow 8-bit bus number overflow inside the hose - | 363 | /* Don't allow 8-bit bus number overflow inside the hose - |
364 | reserve some space for bridges. */ | 364 | reserve some space for bridges. */ |
365 | if (next_busno > 224) { | 365 | if (next_busno > 224) { |
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index 25552508c3fd..f07710849b58 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c | |||
@@ -461,7 +461,7 @@ static void __init pcibios_init_hw(struct hw_pci *hw, struct list_head *head) | |||
461 | if (!sys->bus) | 461 | if (!sys->bus) |
462 | panic("PCI: unable to scan bus!"); | 462 | panic("PCI: unable to scan bus!"); |
463 | 463 | ||
464 | busnr = sys->bus->subordinate + 1; | 464 | busnr = sys->bus->busn_res.end + 1; |
465 | 465 | ||
466 | list_add(&sys->node, head); | 466 | list_add(&sys->node, head); |
467 | } else { | 467 | } else { |
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 524df4295c90..3ca9bed7dc50 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
@@ -384,7 +384,7 @@ pci_acpi_scan_root(struct acpi_pci_root *root) | |||
384 | return NULL; | 384 | return NULL; |
385 | } | 385 | } |
386 | 386 | ||
387 | pbus->subordinate = pci_scan_child_bus(pbus); | 387 | pbus->busn_res.end = pci_scan_child_bus(pbus); |
388 | return pbus; | 388 | return pbus; |
389 | 389 | ||
390 | out3: | 390 | out3: |
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index ed22bfc5db14..9b32483cd0c0 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c | |||
@@ -1506,10 +1506,10 @@ static void __devinit pcibios_scan_phb(struct pci_controller *hose) | |||
1506 | pci_free_resource_list(&resources); | 1506 | pci_free_resource_list(&resources); |
1507 | return; | 1507 | return; |
1508 | } | 1508 | } |
1509 | bus->secondary = hose->first_busno; | 1509 | bus->busn_res.start = hose->first_busno; |
1510 | hose->bus = bus; | 1510 | hose->bus = bus; |
1511 | 1511 | ||
1512 | hose->last_busno = bus->subordinate; | 1512 | hose->last_busno = bus->busn_res.end; |
1513 | } | 1513 | } |
1514 | 1514 | ||
1515 | static int __init pcibios_init(void) | 1515 | static int __init pcibios_init(void) |
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index 271e8c4a54c7..0a9bf778edb5 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c | |||
@@ -102,7 +102,7 @@ static void __devinit pcibios_scanbus(struct pci_controller *hose) | |||
102 | need_domain_info = need_domain_info || hose->index; | 102 | need_domain_info = need_domain_info || hose->index; |
103 | hose->need_domain_info = need_domain_info; | 103 | hose->need_domain_info = need_domain_info; |
104 | if (bus) { | 104 | if (bus) { |
105 | next_busno = bus->subordinate + 1; | 105 | next_busno = bus->busn_res.end + 1; |
106 | /* Don't allow 8-bit bus number overflow inside the hose - | 106 | /* Don't allow 8-bit bus number overflow inside the hose - |
107 | reserve some space for bridges. */ | 107 | reserve some space for bridges. */ |
108 | if (next_busno > 224) { | 108 | if (next_busno > 224) { |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 8e78e93c8185..3532b535698a 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -1646,7 +1646,7 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose) | |||
1646 | pci_free_resource_list(&resources); | 1646 | pci_free_resource_list(&resources); |
1647 | return; | 1647 | return; |
1648 | } | 1648 | } |
1649 | bus->secondary = hose->first_busno; | 1649 | bus->busn_res.start = hose->first_busno; |
1650 | hose->bus = bus; | 1650 | hose->bus = bus; |
1651 | 1651 | ||
1652 | /* Get probe mode and perform scan */ | 1652 | /* Get probe mode and perform scan */ |
@@ -1655,12 +1655,12 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose) | |||
1655 | mode = ppc_md.pci_probe_mode(bus); | 1655 | mode = ppc_md.pci_probe_mode(bus); |
1656 | pr_debug(" probe mode: %d\n", mode); | 1656 | pr_debug(" probe mode: %d\n", mode); |
1657 | if (mode == PCI_PROBE_DEVTREE) { | 1657 | if (mode == PCI_PROBE_DEVTREE) { |
1658 | bus->subordinate = hose->last_busno; | 1658 | bus->busn_res.end = hose->last_busno; |
1659 | of_scan_bus(node, bus); | 1659 | of_scan_bus(node, bus); |
1660 | } | 1660 | } |
1661 | 1661 | ||
1662 | if (mode == PCI_PROBE_NORMAL) | 1662 | if (mode == PCI_PROBE_NORMAL) |
1663 | hose->last_busno = bus->subordinate = pci_scan_child_bus(bus); | 1663 | hose->last_busno = bus->busn_res.end = pci_scan_child_bus(bus); |
1664 | 1664 | ||
1665 | /* Platform gets a chance to do some global fixups before | 1665 | /* Platform gets a chance to do some global fixups before |
1666 | * we proceed to resource allocation | 1666 | * we proceed to resource allocation |
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 94a54f61d341..4ff190ff24a0 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -236,7 +236,7 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus, | |||
236 | 236 | ||
237 | for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) { | 237 | for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) { |
238 | bus = pci_bus_b(ln); | 238 | bus = pci_bus_b(ln); |
239 | if (in_bus >= bus->number && in_bus <= bus->subordinate) | 239 | if (in_bus >= bus->number && in_bus <= bus->busn_res.end) |
240 | break; | 240 | break; |
241 | bus = NULL; | 241 | bus = NULL; |
242 | } | 242 | } |
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c index 89dde171a6fa..a36281aa98f3 100644 --- a/arch/powerpc/kernel/pci_of_scan.c +++ b/arch/powerpc/kernel/pci_of_scan.c | |||
@@ -240,7 +240,7 @@ void __devinit of_scan_pci_bridge(struct pci_dev *dev) | |||
240 | } | 240 | } |
241 | 241 | ||
242 | bus->primary = dev->bus->number; | 242 | bus->primary = dev->bus->number; |
243 | bus->subordinate = busrange[1]; | 243 | bus->busn_res.end = busrange[1]; |
244 | bus->bridge_ctl = 0; | 244 | bus->bridge_ctl = 0; |
245 | 245 | ||
246 | /* parse ranges property */ | 246 | /* parse ranges property */ |
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index fbdd74dac3ac..9cda6a1ad0cf 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c | |||
@@ -589,7 +589,7 @@ static int __devinit pnv_ioda_configure_pe(struct pnv_phb *phb, | |||
589 | dcomp = OPAL_IGNORE_RID_DEVICE_NUMBER; | 589 | dcomp = OPAL_IGNORE_RID_DEVICE_NUMBER; |
590 | fcomp = OPAL_IGNORE_RID_FUNCTION_NUMBER; | 590 | fcomp = OPAL_IGNORE_RID_FUNCTION_NUMBER; |
591 | parent = pe->pbus->self; | 591 | parent = pe->pbus->self; |
592 | count = pe->pbus->subordinate - pe->pbus->secondary + 1; | 592 | count = pe->pbus->busn_res.end - pe->pbus->busn_res.start + 1; |
593 | switch(count) { | 593 | switch(count) { |
594 | case 1: bcomp = OpalPciBusAll; break; | 594 | case 1: bcomp = OpalPciBusAll; break; |
595 | case 2: bcomp = OpalPciBus7Bits; break; | 595 | case 2: bcomp = OpalPciBus7Bits; break; |
@@ -816,11 +816,11 @@ static void __devinit pnv_ioda_setup_bus_PE(struct pci_dev *dev, | |||
816 | pe->pdev = NULL; | 816 | pe->pdev = NULL; |
817 | pe->tce32_seg = -1; | 817 | pe->tce32_seg = -1; |
818 | pe->mve_number = -1; | 818 | pe->mve_number = -1; |
819 | pe->rid = bus->secondary << 8; | 819 | pe->rid = bus->busn_res.start << 8; |
820 | pe->dma_weight = 0; | 820 | pe->dma_weight = 0; |
821 | 821 | ||
822 | pe_info(pe, "Secondary busses %d..%d associated with PE\n", | 822 | pe_info(pe, "Secondary busses %pR associated with PE\n", |
823 | bus->secondary, bus->subordinate); | 823 | &bus->busn_res); |
824 | 824 | ||
825 | if (pnv_ioda_configure_pe(phb, pe)) { | 825 | if (pnv_ioda_configure_pe(phb, pe)) { |
826 | /* XXX What do we do here ? */ | 826 | /* XXX What do we do here ? */ |
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c index 8b7bafa489c2..3ccebc83dc02 100644 --- a/arch/powerpc/platforms/pseries/pci_dlpar.c +++ b/arch/powerpc/platforms/pseries/pci_dlpar.c | |||
@@ -121,7 +121,7 @@ void pcibios_add_pci_devices(struct pci_bus * bus) | |||
121 | if (!num) | 121 | if (!num) |
122 | return; | 122 | return; |
123 | pcibios_setup_bus_devices(bus); | 123 | pcibios_setup_bus_devices(bus); |
124 | max = bus->secondary; | 124 | max = bus->busn_res.start; |
125 | for (pass=0; pass < 2; pass++) | 125 | for (pass=0; pass < 2; pass++) |
126 | list_for_each_entry(dev, &bus->devices, bus_list) { | 126 | list_for_each_entry(dev, &bus->devices, bus_list) { |
127 | if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE || | 127 | if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE || |
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c index 9d10a3cb8797..43068dcb451c 100644 --- a/arch/sh/drivers/pci/pci.c +++ b/arch/sh/drivers/pci/pci.c | |||
@@ -59,7 +59,7 @@ static void __devinit pcibios_scanbus(struct pci_channel *hose) | |||
59 | need_domain_info = need_domain_info || hose->index; | 59 | need_domain_info = need_domain_info || hose->index; |
60 | hose->need_domain_info = need_domain_info; | 60 | hose->need_domain_info = need_domain_info; |
61 | if (bus) { | 61 | if (bus) { |
62 | next_busno = bus->subordinate + 1; | 62 | next_busno = bus->busn_res.end + 1; |
63 | /* Don't allow 8-bit bus number overflow inside the hose - | 63 | /* Don't allow 8-bit bus number overflow inside the hose - |
64 | reserve some space for bridges. */ | 64 | reserve some space for bridges. */ |
65 | if (next_busno > 224) { | 65 | if (next_busno > 224) { |
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index fdaf21811670..c85bfd788f74 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -535,7 +535,7 @@ static void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm, | |||
535 | } | 535 | } |
536 | 536 | ||
537 | bus->primary = dev->bus->number; | 537 | bus->primary = dev->bus->number; |
538 | bus->subordinate = busrange[1]; | 538 | bus->busn_res.end = busrange[1]; |
539 | bus->bridge_ctl = 0; | 539 | bus->bridge_ctl = 0; |
540 | 540 | ||
541 | /* parse ranges property, or cook one up by hand for Simba */ | 541 | /* parse ranges property, or cook one up by hand for Simba */ |
@@ -693,8 +693,8 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm, | |||
693 | pci_free_resource_list(&resources); | 693 | pci_free_resource_list(&resources); |
694 | return NULL; | 694 | return NULL; |
695 | } | 695 | } |
696 | bus->secondary = pbm->pci_first_busno; | 696 | bus->busn_res.start = pbm->pci_first_busno; |
697 | bus->subordinate = pbm->pci_last_busno; | 697 | bus->busn_res.end = pbm->pci_last_busno; |
698 | 698 | ||
699 | pci_of_scan_bus(pbm, node, bus); | 699 | pci_of_scan_bus(pbm, node, bus); |
700 | pci_bus_add_devices(bus); | 700 | pci_bus_add_devices(bus); |
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index b56d12bf5900..54cc8d77c90c 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c | |||
@@ -329,7 +329,7 @@ int __init pcibios_init(void) | |||
329 | */ | 329 | */ |
330 | bus = pci_scan_bus(0, controller->ops, controller); | 330 | bus = pci_scan_bus(0, controller->ops, controller); |
331 | controller->root_bus = bus; | 331 | controller->root_bus = bus; |
332 | controller->last_busno = bus->subordinate; | 332 | controller->last_busno = bus->busn_res.end; |
333 | } | 333 | } |
334 | } | 334 | } |
335 | 335 | ||
@@ -366,7 +366,7 @@ int __init pcibios_init(void) | |||
366 | */ | 366 | */ |
367 | if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && | 367 | if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && |
368 | (PCI_SLOT(dev->devfn) == 0)) { | 368 | (PCI_SLOT(dev->devfn) == 0)) { |
369 | next_bus = dev->subordinate; | 369 | next_bus = dev->busn_res.end; |
370 | controllers[i].mem_resources[0] = | 370 | controllers[i].mem_resources[0] = |
371 | *next_bus->resource[0]; | 371 | *next_bus->resource[0]; |
372 | controllers[i].mem_resources[1] = | 372 | controllers[i].mem_resources[1] = |
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index fc09c2754e08..350fe63c8a42 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -440,7 +440,7 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_pci_root *root) | |||
440 | bus = pci_create_root_bus(NULL, busnum, &pci_root_ops, sd, | 440 | bus = pci_create_root_bus(NULL, busnum, &pci_root_ops, sd, |
441 | &resources); | 441 | &resources); |
442 | if (bus) { | 442 | if (bus) { |
443 | bus->subordinate = pci_scan_child_bus(bus); | 443 | bus->busn_res.end = pci_scan_child_bus(bus); |
444 | pci_set_host_bridge_release( | 444 | pci_set_host_bridge_release( |
445 | to_pci_host_bridge(bus->bridge), | 445 | to_pci_host_bridge(bus->bridge), |
446 | release_pci_root_info, info); | 446 | release_pci_root_info, info); |
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c index eb30e356f5be..9c57c1e6870c 100644 --- a/arch/xtensa/kernel/pci.c +++ b/arch/xtensa/kernel/pci.c | |||
@@ -187,7 +187,7 @@ static int __init pcibios_init(void) | |||
187 | bus = pci_scan_root_bus(NULL, pci_ctrl->first_busno, | 187 | bus = pci_scan_root_bus(NULL, pci_ctrl->first_busno, |
188 | pci_ctrl->ops, pci_ctrl, &resources); | 188 | pci_ctrl->ops, pci_ctrl, &resources); |
189 | pci_ctrl->bus = bus; | 189 | pci_ctrl->bus = bus; |
190 | pci_ctrl->last_busno = bus->subordinate; | 190 | pci_ctrl->last_busno = bus->busn_res.end; |
191 | if (next_busno <= pci_ctrl->last_busno) | 191 | if (next_busno <= pci_ctrl->last_busno) |
192 | next_busno = pci_ctrl->last_busno+1; | 192 | next_busno = pci_ctrl->last_busno+1; |
193 | } | 193 | } |
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index b12af2ff8c54..2fb7d1598a68 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
@@ -661,7 +661,7 @@ static struct intel_iommu *device_to_iommu(int segment, u8 bus, u8 devfn) | |||
661 | if (drhd->devices[i] && | 661 | if (drhd->devices[i] && |
662 | drhd->devices[i]->subordinate && | 662 | drhd->devices[i]->subordinate && |
663 | drhd->devices[i]->subordinate->number <= bus && | 663 | drhd->devices[i]->subordinate->number <= bus && |
664 | drhd->devices[i]->subordinate->subordinate >= bus) | 664 | drhd->devices[i]->subordinate->busn_res.end >= bus) |
665 | return drhd->iommu; | 665 | return drhd->iommu; |
666 | } | 666 | } |
667 | 667 | ||
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index edeeb516807a..09fa3c687a1f 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
@@ -14168,7 +14168,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
14168 | if (bridge->subordinate && | 14168 | if (bridge->subordinate && |
14169 | (bridge->subordinate->number <= | 14169 | (bridge->subordinate->number <= |
14170 | tp->pdev->bus->number) && | 14170 | tp->pdev->bus->number) && |
14171 | (bridge->subordinate->subordinate >= | 14171 | (bridge->subordinate->busn_res.end >= |
14172 | tp->pdev->bus->number)) { | 14172 | tp->pdev->bus->number)) { |
14173 | tg3_flag_set(tp, 5701_DMA_BUG); | 14173 | tg3_flag_set(tp, 5701_DMA_BUG); |
14174 | pci_dev_put(bridge); | 14174 | pci_dev_put(bridge); |
@@ -14196,7 +14196,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
14196 | if (bridge && bridge->subordinate && | 14196 | if (bridge && bridge->subordinate && |
14197 | (bridge->subordinate->number <= | 14197 | (bridge->subordinate->number <= |
14198 | tp->pdev->bus->number) && | 14198 | tp->pdev->bus->number) && |
14199 | (bridge->subordinate->subordinate >= | 14199 | (bridge->subordinate->busn_res.end >= |
14200 | tp->pdev->bus->number)) { | 14200 | tp->pdev->bus->number)) { |
14201 | tg3_flag_set(tp, 40BIT_DMA_BUG); | 14201 | tg3_flag_set(tp, 40BIT_DMA_BUG); |
14202 | pci_dev_put(bridge); | 14202 | pci_dev_put(bridge); |
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index 432d4bbcc62a..70517b0f94e6 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c | |||
@@ -174,7 +174,7 @@ static int dino_cfg_read(struct pci_bus *bus, unsigned int devfn, int where, | |||
174 | int size, u32 *val) | 174 | int size, u32 *val) |
175 | { | 175 | { |
176 | struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge)); | 176 | struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge)); |
177 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; | 177 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start; |
178 | u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3); | 178 | u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3); |
179 | void __iomem *base_addr = d->hba.base_addr; | 179 | void __iomem *base_addr = d->hba.base_addr; |
180 | unsigned long flags; | 180 | unsigned long flags; |
@@ -209,7 +209,7 @@ static int dino_cfg_write(struct pci_bus *bus, unsigned int devfn, int where, | |||
209 | int size, u32 val) | 209 | int size, u32 val) |
210 | { | 210 | { |
211 | struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge)); | 211 | struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge)); |
212 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; | 212 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start; |
213 | u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3); | 213 | u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3); |
214 | void __iomem *base_addr = d->hba.base_addr; | 214 | void __iomem *base_addr = d->hba.base_addr; |
215 | unsigned long flags; | 215 | unsigned long flags; |
@@ -554,7 +554,7 @@ dino_fixup_bus(struct pci_bus *bus) | |||
554 | struct dino_device *dino_dev = DINO_DEV(parisc_walk_tree(bus->bridge)); | 554 | struct dino_device *dino_dev = DINO_DEV(parisc_walk_tree(bus->bridge)); |
555 | 555 | ||
556 | DBG(KERN_WARNING "%s(0x%p) bus %d platform_data 0x%p\n", | 556 | DBG(KERN_WARNING "%s(0x%p) bus %d platform_data 0x%p\n", |
557 | __func__, bus, bus->secondary, | 557 | __func__, bus, bus->busn_res.start, |
558 | bus->bridge->platform_data); | 558 | bus->bridge->platform_data); |
559 | 559 | ||
560 | /* Firmware doesn't set up card-mode dino, so we have to */ | 560 | /* Firmware doesn't set up card-mode dino, so we have to */ |
@@ -998,12 +998,12 @@ static int __init dino_probe(struct parisc_device *dev) | |||
998 | return 0; | 998 | return 0; |
999 | } | 999 | } |
1000 | 1000 | ||
1001 | bus->subordinate = pci_scan_child_bus(bus); | 1001 | bus->busn_res.end = pci_scan_child_bus(bus); |
1002 | 1002 | ||
1003 | /* This code *depends* on scanning being single threaded | 1003 | /* This code *depends* on scanning being single threaded |
1004 | * if it isn't, this global bus number count will fail | 1004 | * if it isn't, this global bus number count will fail |
1005 | */ | 1005 | */ |
1006 | dino_current_bus = bus->subordinate + 1; | 1006 | dino_current_bus = bus->busn_res.end + 1; |
1007 | pci_bus_assign_resources(bus); | 1007 | pci_bus_assign_resources(bus); |
1008 | pci_bus_add_devices(bus); | 1008 | pci_bus_add_devices(bus); |
1009 | return 0; | 1009 | return 0; |
diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c index 1f9e9fefb8e7..83380c8fcb6b 100644 --- a/drivers/parisc/iosapic.c +++ b/drivers/parisc/iosapic.c | |||
@@ -532,7 +532,7 @@ iosapic_xlate_pin(struct iosapic_info *isi, struct pci_dev *pcidev) | |||
532 | intr_slot = PCI_SLOT(pcidev->devfn); | 532 | intr_slot = PCI_SLOT(pcidev->devfn); |
533 | } | 533 | } |
534 | DBG_IRT("iosapic_xlate_pin: bus %d slot %d pin %d\n", | 534 | DBG_IRT("iosapic_xlate_pin: bus %d slot %d pin %d\n", |
535 | pcidev->bus->secondary, intr_slot, intr_pin); | 535 | pcidev->bus->busn_res.start, intr_slot, intr_pin); |
536 | 536 | ||
537 | return irt_find_irqline(isi, intr_slot, intr_pin); | 537 | return irt_find_irqline(isi, intr_slot, intr_pin); |
538 | } | 538 | } |
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c index 052fa230bc77..cd8f9ce8720f 100644 --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c | |||
@@ -189,8 +189,8 @@ lba_dump_res(struct resource *r, int d) | |||
189 | 189 | ||
190 | static int lba_device_present(u8 bus, u8 dfn, struct lba_device *d) | 190 | static int lba_device_present(u8 bus, u8 dfn, struct lba_device *d) |
191 | { | 191 | { |
192 | u8 first_bus = d->hba.hba_bus->secondary; | 192 | u8 first_bus = d->hba.hba_bus->busn_res.start; |
193 | u8 last_sub_bus = d->hba.hba_bus->subordinate; | 193 | u8 last_sub_bus = d->hba.hba_bus->busn_res.end; |
194 | 194 | ||
195 | if ((bus < first_bus) || | 195 | if ((bus < first_bus) || |
196 | (bus > last_sub_bus) || | 196 | (bus > last_sub_bus) || |
@@ -364,7 +364,7 @@ lba_rd_cfg(struct lba_device *d, u32 tok, u8 reg, u32 size) | |||
364 | static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) | 364 | static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) |
365 | { | 365 | { |
366 | struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); | 366 | struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); |
367 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; | 367 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start; |
368 | u32 tok = LBA_CFG_TOK(local_bus, devfn); | 368 | u32 tok = LBA_CFG_TOK(local_bus, devfn); |
369 | void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; | 369 | void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; |
370 | 370 | ||
@@ -380,7 +380,7 @@ static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int | |||
380 | return 0; | 380 | return 0; |
381 | } | 381 | } |
382 | 382 | ||
383 | if (LBA_SKIP_PROBE(d) && !lba_device_present(bus->secondary, devfn, d)) { | 383 | if (LBA_SKIP_PROBE(d) && !lba_device_present(bus->busn_res.start, devfn, d)) { |
384 | DBG_CFG("%s(%x+%2x) -> -1 (b)\n", __func__, tok, pos); | 384 | DBG_CFG("%s(%x+%2x) -> -1 (b)\n", __func__, tok, pos); |
385 | /* either don't want to look or know device isn't present. */ | 385 | /* either don't want to look or know device isn't present. */ |
386 | *data = ~0U; | 386 | *data = ~0U; |
@@ -431,7 +431,7 @@ lba_wr_cfg(struct lba_device *d, u32 tok, u8 reg, u32 data, u32 size) | |||
431 | static int elroy_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 data) | 431 | static int elroy_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 data) |
432 | { | 432 | { |
433 | struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); | 433 | struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); |
434 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; | 434 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start; |
435 | u32 tok = LBA_CFG_TOK(local_bus,devfn); | 435 | u32 tok = LBA_CFG_TOK(local_bus,devfn); |
436 | 436 | ||
437 | if ((pos > 255) || (devfn > 255)) | 437 | if ((pos > 255) || (devfn > 255)) |
@@ -444,7 +444,7 @@ static int elroy_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int | |||
444 | return 0; | 444 | return 0; |
445 | } | 445 | } |
446 | 446 | ||
447 | if (LBA_SKIP_PROBE(d) && (!lba_device_present(bus->secondary, devfn, d))) { | 447 | if (LBA_SKIP_PROBE(d) && (!lba_device_present(bus->busn_res.start, devfn, d))) { |
448 | DBG_CFG("%s(%x+%2x) = 0x%x (b)\n", __func__, tok, pos,data); | 448 | DBG_CFG("%s(%x+%2x) = 0x%x (b)\n", __func__, tok, pos,data); |
449 | return 1; /* New Workaround */ | 449 | return 1; /* New Workaround */ |
450 | } | 450 | } |
@@ -481,7 +481,7 @@ static struct pci_ops elroy_cfg_ops = { | |||
481 | static int mercury_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) | 481 | static int mercury_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) |
482 | { | 482 | { |
483 | struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); | 483 | struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); |
484 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; | 484 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start; |
485 | u32 tok = LBA_CFG_TOK(local_bus, devfn); | 485 | u32 tok = LBA_CFG_TOK(local_bus, devfn); |
486 | void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; | 486 | void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; |
487 | 487 | ||
@@ -514,7 +514,7 @@ static int mercury_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, i | |||
514 | { | 514 | { |
515 | struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); | 515 | struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); |
516 | void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; | 516 | void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; |
517 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; | 517 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start; |
518 | u32 tok = LBA_CFG_TOK(local_bus,devfn); | 518 | u32 tok = LBA_CFG_TOK(local_bus,devfn); |
519 | 519 | ||
520 | if ((pos > 255) || (devfn > 255)) | 520 | if ((pos > 255) || (devfn > 255)) |
@@ -636,7 +636,7 @@ lba_fixup_bus(struct pci_bus *bus) | |||
636 | struct lba_device *ldev = LBA_DEV(parisc_walk_tree(bus->bridge)); | 636 | struct lba_device *ldev = LBA_DEV(parisc_walk_tree(bus->bridge)); |
637 | 637 | ||
638 | DBG("lba_fixup_bus(0x%p) bus %d platform_data 0x%p\n", | 638 | DBG("lba_fixup_bus(0x%p) bus %d platform_data 0x%p\n", |
639 | bus, bus->secondary, bus->bridge->platform_data); | 639 | bus, (int)bus->busn_res.start, bus->bridge->platform_data); |
640 | 640 | ||
641 | /* | 641 | /* |
642 | ** Properly Setup MMIO resources for this bus. | 642 | ** Properly Setup MMIO resources for this bus. |
@@ -1511,7 +1511,7 @@ lba_driver_probe(struct parisc_device *dev) | |||
1511 | return 0; | 1511 | return 0; |
1512 | } | 1512 | } |
1513 | 1513 | ||
1514 | lba_bus->subordinate = pci_scan_child_bus(lba_bus); | 1514 | lba_bus->busn_res.end = pci_scan_child_bus(lba_bus); |
1515 | 1515 | ||
1516 | /* This is in lieu of calling pci_assign_unassigned_resources() */ | 1516 | /* This is in lieu of calling pci_assign_unassigned_resources() */ |
1517 | if (is_pdc_pat()) { | 1517 | if (is_pdc_pat()) { |
@@ -1541,7 +1541,7 @@ lba_driver_probe(struct parisc_device *dev) | |||
1541 | lba_dev->flags |= LBA_FLAG_SKIP_PROBE; | 1541 | lba_dev->flags |= LBA_FLAG_SKIP_PROBE; |
1542 | } | 1542 | } |
1543 | 1543 | ||
1544 | lba_next_bus = lba_bus->subordinate + 1; | 1544 | lba_next_bus = lba_res->busn_res.end + 1; |
1545 | pci_bus_add_devices(lba_bus); | 1545 | pci_bus_add_devices(lba_bus); |
1546 | 1546 | ||
1547 | /* Whew! Finally done! Tell services we got this one covered. */ | 1547 | /* Whew! Finally done! Tell services we got this one covered. */ |
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 806c44fa645a..62d0ae4dfcad 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -100,11 +100,11 @@ static int post_dock_fixups(struct notifier_block *nb, unsigned long val, | |||
100 | PCI_PRIMARY_BUS, | 100 | PCI_PRIMARY_BUS, |
101 | &buses); | 101 | &buses); |
102 | 102 | ||
103 | if (((buses >> 8) & 0xff) != bus->secondary) { | 103 | if (((buses >> 8) & 0xff) != bus->busn_res.start) { |
104 | buses = (buses & 0xff000000) | 104 | buses = (buses & 0xff000000) |
105 | | ((unsigned int)(bus->primary) << 0) | 105 | | ((unsigned int)(bus->primary) << 0) |
106 | | ((unsigned int)(bus->secondary) << 8) | 106 | | ((unsigned int)(bus->busn_res.start) << 8) |
107 | | ((unsigned int)(bus->subordinate) << 16); | 107 | | ((unsigned int)(bus->busn_res.end) << 16); |
108 | pci_write_config_dword(bus->self, PCI_PRIMARY_BUS, buses); | 108 | pci_write_config_dword(bus->self, PCI_PRIMARY_BUS, buses); |
109 | } | 109 | } |
110 | return NOTIFY_OK; | 110 | return NOTIFY_OK; |
@@ -692,7 +692,7 @@ static unsigned char acpiphp_max_busnr(struct pci_bus *bus) | |||
692 | * bus->subordinate value because it could have | 692 | * bus->subordinate value because it could have |
693 | * padding in it. | 693 | * padding in it. |
694 | */ | 694 | */ |
695 | max = bus->secondary; | 695 | max = bus->busn_res.start; |
696 | 696 | ||
697 | list_for_each(tmp, &bus->children) { | 697 | list_for_each(tmp, &bus->children) { |
698 | n = pci_bus_max_busnr(pci_bus_b(tmp)); | 698 | n = pci_bus_max_busnr(pci_bus_b(tmp)); |
diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c index ae853ccd0cd5..42f3a61db87c 100644 --- a/drivers/pci/hotplug/cpci_hotplug_pci.c +++ b/drivers/pci/hotplug/cpci_hotplug_pci.c | |||
@@ -292,8 +292,8 @@ int __ref cpci_configure_slot(struct slot *slot) | |||
292 | (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) { | 292 | (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) { |
293 | /* Find an unused bus number for the new bridge */ | 293 | /* Find an unused bus number for the new bridge */ |
294 | struct pci_bus *child; | 294 | struct pci_bus *child; |
295 | unsigned char busnr, start = parent->secondary; | 295 | unsigned char busnr, start = parent->busn_res.start; |
296 | unsigned char end = parent->subordinate; | 296 | unsigned char end = parent->busn_res.end; |
297 | 297 | ||
298 | for (busnr = start; busnr <= end; busnr++) { | 298 | for (busnr = start; busnr <= end; busnr++) { |
299 | if (!pci_find_bus(pci_domain_nr(parent), | 299 | if (!pci_find_bus(pci_domain_nr(parent), |
@@ -312,7 +312,7 @@ int __ref cpci_configure_slot(struct slot *slot) | |||
312 | pci_dev_put(dev); | 312 | pci_dev_put(dev); |
313 | continue; | 313 | continue; |
314 | } | 314 | } |
315 | child->subordinate = pci_do_scan_bus(child); | 315 | child->busn_res.end = pci_do_scan_bus(child); |
316 | pci_bus_size_bridges(child); | 316 | pci_bus_size_bridges(child); |
317 | } | 317 | } |
318 | pci_dev_put(dev); | 318 | pci_dev_put(dev); |
diff --git a/drivers/pci/hotplug/pciehp_pci.c b/drivers/pci/hotplug/pciehp_pci.c index 47d9dc06b109..b898f06b588d 100644 --- a/drivers/pci/hotplug/pciehp_pci.c +++ b/drivers/pci/hotplug/pciehp_pci.c | |||
@@ -37,8 +37,8 @@ | |||
37 | static int __ref pciehp_add_bridge(struct pci_dev *dev) | 37 | static int __ref pciehp_add_bridge(struct pci_dev *dev) |
38 | { | 38 | { |
39 | struct pci_bus *parent = dev->bus; | 39 | struct pci_bus *parent = dev->bus; |
40 | int pass, busnr, start = parent->secondary; | 40 | int pass, busnr, start = parent->busn_res.start; |
41 | int end = parent->subordinate; | 41 | int end = parent->busn_res.end; |
42 | 42 | ||
43 | for (busnr = start; busnr <= end; busnr++) { | 43 | for (busnr = start; busnr <= end; busnr++) { |
44 | if (!pci_find_bus(pci_domain_nr(parent), busnr)) | 44 | if (!pci_find_bus(pci_domain_nr(parent), busnr)) |
diff --git a/drivers/pci/hotplug/shpchp_pci.c b/drivers/pci/hotplug/shpchp_pci.c index df7e4bfadae3..d021eb031b3c 100644 --- a/drivers/pci/hotplug/shpchp_pci.c +++ b/drivers/pci/hotplug/shpchp_pci.c | |||
@@ -64,8 +64,8 @@ int __ref shpchp_configure_device(struct slot *p_slot) | |||
64 | (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) { | 64 | (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) { |
65 | /* Find an unused bus number for the new bridge */ | 65 | /* Find an unused bus number for the new bridge */ |
66 | struct pci_bus *child; | 66 | struct pci_bus *child; |
67 | unsigned char busnr, start = parent->secondary; | 67 | unsigned char busnr, start = parent->busn_res.start; |
68 | unsigned char end = parent->subordinate; | 68 | unsigned char end = parent->busn_res.end; |
69 | for (busnr = start; busnr <= end; busnr++) { | 69 | for (busnr = start; busnr <= end; busnr++) { |
70 | if (!pci_find_bus(pci_domain_nr(parent), | 70 | if (!pci_find_bus(pci_domain_nr(parent), |
71 | busnr)) | 71 | busnr)) |
@@ -84,7 +84,7 @@ int __ref shpchp_configure_device(struct slot *p_slot) | |||
84 | pci_dev_put(dev); | 84 | pci_dev_put(dev); |
85 | continue; | 85 | continue; |
86 | } | 86 | } |
87 | child->subordinate = pci_do_scan_bus(child); | 87 | child->busn_res.end = pci_do_scan_bus(child); |
88 | pci_bus_size_bridges(child); | 88 | pci_bus_size_bridges(child); |
89 | } | 89 | } |
90 | pci_configure_slot(dev); | 90 | pci_configure_slot(dev); |
diff --git a/drivers/pci/hotplug/shpchp_sysfs.c b/drivers/pci/hotplug/shpchp_sysfs.c index efa30da1ae8f..eeb23ceae4a8 100644 --- a/drivers/pci/hotplug/shpchp_sysfs.c +++ b/drivers/pci/hotplug/shpchp_sysfs.c | |||
@@ -73,13 +73,13 @@ static ssize_t show_ctrl (struct device *dev, struct device_attribute *attr, cha | |||
73 | } | 73 | } |
74 | } | 74 | } |
75 | out += sprintf(out, "Free resources: bus numbers\n"); | 75 | out += sprintf(out, "Free resources: bus numbers\n"); |
76 | for (busnr = bus->secondary; busnr <= bus->subordinate; busnr++) { | 76 | for (busnr = bus->busn_res.start; busnr <= bus->busn_res.end; busnr++) { |
77 | if (!pci_find_bus(pci_domain_nr(bus), busnr)) | 77 | if (!pci_find_bus(pci_domain_nr(bus), busnr)) |
78 | break; | 78 | break; |
79 | } | 79 | } |
80 | if (busnr < bus->subordinate) | 80 | if (busnr < bus->busn_res.end) |
81 | out += sprintf(out, "start = %8.8x, length = %8.8x\n", | 81 | out += sprintf(out, "start = %8.8x, length = %8.8x\n", |
82 | busnr, (bus->subordinate - busnr)); | 82 | busnr, (int)(bus->busn_res.end - busnr)); |
83 | 83 | ||
84 | return out - buf; | 84 | return out - buf; |
85 | } | 85 | } |
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 6554e1a0f634..e873060fb35b 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c | |||
@@ -47,7 +47,7 @@ static struct pci_bus *virtfn_add_bus(struct pci_bus *bus, int busnr) | |||
47 | if (!child) | 47 | if (!child) |
48 | return NULL; | 48 | return NULL; |
49 | 49 | ||
50 | child->subordinate = busnr; | 50 | child->busn_res.end = busnr; |
51 | child->dev.parent = bus->bridge; | 51 | child->dev.parent = bus->bridge; |
52 | rc = pci_bus_add_child(child); | 52 | rc = pci_bus_add_child(child); |
53 | if (rc) { | 53 | if (rc) { |
@@ -327,7 +327,7 @@ static int sriov_enable(struct pci_dev *dev, int nr_virtfn) | |||
327 | iov->offset = offset; | 327 | iov->offset = offset; |
328 | iov->stride = stride; | 328 | iov->stride = stride; |
329 | 329 | ||
330 | if (virtfn_bus(dev, nr_virtfn - 1) > dev->bus->subordinate) { | 330 | if (virtfn_bus(dev, nr_virtfn - 1) > dev->bus->busn_res.end) { |
331 | dev_err(&dev->dev, "SR-IOV: bus number out of range\n"); | 331 | dev_err(&dev->dev, "SR-IOV: bus number out of range\n"); |
332 | return -ENOMEM; | 332 | return -ENOMEM; |
333 | } | 333 | } |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 447e83472c01..aeda6e9c245c 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -110,7 +110,7 @@ unsigned char pci_bus_max_busnr(struct pci_bus* bus) | |||
110 | struct list_head *tmp; | 110 | struct list_head *tmp; |
111 | unsigned char max, n; | 111 | unsigned char max, n; |
112 | 112 | ||
113 | max = bus->subordinate; | 113 | max = bus->busn_res.end; |
114 | list_for_each(tmp, &bus->children) { | 114 | list_for_each(tmp, &bus->children) { |
115 | n = pci_bus_max_busnr(pci_bus_b(tmp)); | 115 | n = pci_bus_max_busnr(pci_bus_b(tmp)); |
116 | if(n > max) | 116 | if(n > max) |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 658ac977cb56..651b096134dc 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -381,8 +381,8 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) | |||
381 | if (pci_is_root_bus(child)) /* It's a host bus, nothing to read */ | 381 | if (pci_is_root_bus(child)) /* It's a host bus, nothing to read */ |
382 | return; | 382 | return; |
383 | 383 | ||
384 | dev_info(&dev->dev, "PCI bridge to [bus %02x-%02x]%s\n", | 384 | dev_info(&dev->dev, "PCI bridge to %pR%s\n", |
385 | child->secondary, child->subordinate, | 385 | &child->busn_res, |
386 | dev->transparent ? " (subtractive decode)" : ""); | 386 | dev->transparent ? " (subtractive decode)" : ""); |
387 | 387 | ||
388 | pci_bus_remove_resources(child); | 388 | pci_bus_remove_resources(child); |
@@ -599,9 +599,9 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent, | |||
599 | * Set up the primary, secondary and subordinate | 599 | * Set up the primary, secondary and subordinate |
600 | * bus numbers. | 600 | * bus numbers. |
601 | */ | 601 | */ |
602 | child->number = child->secondary = busnr; | 602 | child->number = child->busn_res.start = busnr; |
603 | child->primary = parent->secondary; | 603 | child->primary = parent->busn_res.start; |
604 | child->subordinate = 0xff; | 604 | child->busn_res.end = 0xff; |
605 | 605 | ||
606 | if (!bridge) | 606 | if (!bridge) |
607 | return child; | 607 | return child; |
@@ -643,8 +643,8 @@ static void pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max) | |||
643 | if (!pcibios_assign_all_busses()) | 643 | if (!pcibios_assign_all_busses()) |
644 | return; | 644 | return; |
645 | 645 | ||
646 | while (parent->parent && parent->subordinate < max) { | 646 | while (parent->parent && parent->busn_res.end < max) { |
647 | parent->subordinate = max; | 647 | parent->busn_res.end = max; |
648 | pci_write_config_byte(parent->self, PCI_SUBORDINATE_BUS, max); | 648 | pci_write_config_byte(parent->self, PCI_SUBORDINATE_BUS, max); |
649 | parent = parent->parent; | 649 | parent = parent->parent; |
650 | } | 650 | } |
@@ -718,15 +718,15 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
718 | if (!child) | 718 | if (!child) |
719 | goto out; | 719 | goto out; |
720 | child->primary = primary; | 720 | child->primary = primary; |
721 | child->subordinate = subordinate; | 721 | child->busn_res.end = subordinate; |
722 | child->bridge_ctl = bctl; | 722 | child->bridge_ctl = bctl; |
723 | } | 723 | } |
724 | 724 | ||
725 | cmax = pci_scan_child_bus(child); | 725 | cmax = pci_scan_child_bus(child); |
726 | if (cmax > max) | 726 | if (cmax > max) |
727 | max = cmax; | 727 | max = cmax; |
728 | if (child->subordinate > max) | 728 | if (child->busn_res.end > max) |
729 | max = child->subordinate; | 729 | max = child->busn_res.end; |
730 | } else { | 730 | } else { |
731 | /* | 731 | /* |
732 | * We need to assign a number to this bus which we always | 732 | * We need to assign a number to this bus which we always |
@@ -759,8 +759,8 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
759 | } | 759 | } |
760 | buses = (buses & 0xff000000) | 760 | buses = (buses & 0xff000000) |
761 | | ((unsigned int)(child->primary) << 0) | 761 | | ((unsigned int)(child->primary) << 0) |
762 | | ((unsigned int)(child->secondary) << 8) | 762 | | ((unsigned int)(child->busn_res.start) << 8) |
763 | | ((unsigned int)(child->subordinate) << 16); | 763 | | ((unsigned int)(child->busn_res.end) << 16); |
764 | 764 | ||
765 | /* | 765 | /* |
766 | * yenta.c forces a secondary latency timer of 176. | 766 | * yenta.c forces a secondary latency timer of 176. |
@@ -805,8 +805,8 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
805 | break; | 805 | break; |
806 | while (parent->parent) { | 806 | while (parent->parent) { |
807 | if ((!pcibios_assign_all_busses()) && | 807 | if ((!pcibios_assign_all_busses()) && |
808 | (parent->subordinate > max) && | 808 | (parent->busn_res.end > max) && |
809 | (parent->subordinate <= max+i)) { | 809 | (parent->busn_res.end <= max+i)) { |
810 | j = 1; | 810 | j = 1; |
811 | } | 811 | } |
812 | parent = parent->parent; | 812 | parent = parent->parent; |
@@ -827,7 +827,7 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
827 | /* | 827 | /* |
828 | * Set the subordinate bus number to its real value. | 828 | * Set the subordinate bus number to its real value. |
829 | */ | 829 | */ |
830 | child->subordinate = max; | 830 | child->busn_res.end = max; |
831 | pci_write_config_byte(dev, PCI_SUBORDINATE_BUS, max); | 831 | pci_write_config_byte(dev, PCI_SUBORDINATE_BUS, max); |
832 | } | 832 | } |
833 | 833 | ||
@@ -837,19 +837,19 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
837 | 837 | ||
838 | /* Has only triggered on CardBus, fixup is in yenta_socket */ | 838 | /* Has only triggered on CardBus, fixup is in yenta_socket */ |
839 | while (bus->parent) { | 839 | while (bus->parent) { |
840 | if ((child->subordinate > bus->subordinate) || | 840 | if ((child->busn_res.end > bus->busn_res.end) || |
841 | (child->number > bus->subordinate) || | 841 | (child->number > bus->busn_res.end) || |
842 | (child->number < bus->number) || | 842 | (child->number < bus->number) || |
843 | (child->subordinate < bus->number)) { | 843 | (child->busn_res.end < bus->number)) { |
844 | dev_info(&child->dev, "[bus %02x-%02x] %s " | 844 | dev_info(&child->dev, "%pR %s " |
845 | "hidden behind%s bridge %s [bus %02x-%02x]\n", | 845 | "hidden behind%s bridge %s %pR\n", |
846 | child->number, child->subordinate, | 846 | &child->busn_res, |
847 | (bus->number > child->subordinate && | 847 | (bus->number > child->busn_res.end && |
848 | bus->subordinate < child->number) ? | 848 | bus->busn_res.end < child->number) ? |
849 | "wholly" : "partially", | 849 | "wholly" : "partially", |
850 | bus->self->transparent ? " transparent" : "", | 850 | bus->self->transparent ? " transparent" : "", |
851 | dev_name(&bus->dev), | 851 | dev_name(&bus->dev), |
852 | bus->number, bus->subordinate); | 852 | &bus->busn_res); |
853 | } | 853 | } |
854 | bus = bus->parent; | 854 | bus = bus->parent; |
855 | } | 855 | } |
@@ -1548,7 +1548,7 @@ EXPORT_SYMBOL_GPL(pcie_bus_configure_settings); | |||
1548 | 1548 | ||
1549 | unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus) | 1549 | unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus) |
1550 | { | 1550 | { |
1551 | unsigned int devfn, pass, max = bus->secondary; | 1551 | unsigned int devfn, pass, max = bus->busn_res.start; |
1552 | struct pci_dev *dev; | 1552 | struct pci_dev *dev; |
1553 | 1553 | ||
1554 | dev_dbg(&bus->dev, "scanning bus\n"); | 1554 | dev_dbg(&bus->dev, "scanning bus\n"); |
@@ -1642,7 +1642,7 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus, | |||
1642 | /* Create legacy_io and legacy_mem files for this bus */ | 1642 | /* Create legacy_io and legacy_mem files for this bus */ |
1643 | pci_create_legacy_files(b); | 1643 | pci_create_legacy_files(b); |
1644 | 1644 | ||
1645 | b->number = b->secondary = bus; | 1645 | b->number = b->busn_res.start = bus; |
1646 | 1646 | ||
1647 | if (parent) | 1647 | if (parent) |
1648 | dev_info(parent, "PCI host bridge to bus %s\n", dev_name(&b->dev)); | 1648 | dev_info(parent, "PCI host bridge to bus %s\n", dev_name(&b->dev)); |
@@ -1693,7 +1693,7 @@ struct pci_bus * __devinit pci_scan_root_bus(struct device *parent, int bus, | |||
1693 | if (!b) | 1693 | if (!b) |
1694 | return NULL; | 1694 | return NULL; |
1695 | 1695 | ||
1696 | b->subordinate = pci_scan_child_bus(b); | 1696 | b->busn_res.end = pci_scan_child_bus(b); |
1697 | pci_bus_add_devices(b); | 1697 | pci_bus_add_devices(b); |
1698 | return b; | 1698 | return b; |
1699 | } | 1699 | } |
@@ -1710,7 +1710,7 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, | |||
1710 | pci_add_resource(&resources, &iomem_resource); | 1710 | pci_add_resource(&resources, &iomem_resource); |
1711 | b = pci_create_root_bus(parent, bus, ops, sysdata, &resources); | 1711 | b = pci_create_root_bus(parent, bus, ops, sysdata, &resources); |
1712 | if (b) | 1712 | if (b) |
1713 | b->subordinate = pci_scan_child_bus(b); | 1713 | b->busn_res.end = pci_scan_child_bus(b); |
1714 | else | 1714 | else |
1715 | pci_free_resource_list(&resources); | 1715 | pci_free_resource_list(&resources); |
1716 | return b; | 1716 | return b; |
@@ -1727,7 +1727,7 @@ struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops, | |||
1727 | pci_add_resource(&resources, &iomem_resource); | 1727 | pci_add_resource(&resources, &iomem_resource); |
1728 | b = pci_create_root_bus(NULL, bus, ops, sysdata, &resources); | 1728 | b = pci_create_root_bus(NULL, bus, ops, sysdata, &resources); |
1729 | if (b) { | 1729 | if (b) { |
1730 | b->subordinate = pci_scan_child_bus(b); | 1730 | b->busn_res.end = pci_scan_child_bus(b); |
1731 | pci_bus_add_devices(b); | 1731 | pci_bus_add_devices(b); |
1732 | } else { | 1732 | } else { |
1733 | pci_free_resource_list(&resources); | 1733 | pci_free_resource_list(&resources); |
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 8fa2d4be88de..192172c87b77 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -404,8 +404,8 @@ void pci_setup_cardbus(struct pci_bus *bus) | |||
404 | struct resource *res; | 404 | struct resource *res; |
405 | struct pci_bus_region region; | 405 | struct pci_bus_region region; |
406 | 406 | ||
407 | dev_info(&bridge->dev, "CardBus bridge to [bus %02x-%02x]\n", | 407 | dev_info(&bridge->dev, "CardBus bridge to %pR\n", |
408 | bus->secondary, bus->subordinate); | 408 | &bus->busn_res); |
409 | 409 | ||
410 | res = bus->resource[0]; | 410 | res = bus->resource[0]; |
411 | pcibios_resource_to_bus(bridge, ®ion, res); | 411 | pcibios_resource_to_bus(bridge, ®ion, res); |
@@ -553,8 +553,8 @@ static void __pci_setup_bridge(struct pci_bus *bus, unsigned long type) | |||
553 | { | 553 | { |
554 | struct pci_dev *bridge = bus->self; | 554 | struct pci_dev *bridge = bus->self; |
555 | 555 | ||
556 | dev_info(&bridge->dev, "PCI bridge to [bus %02x-%02x]\n", | 556 | dev_info(&bridge->dev, "PCI bridge to %pR\n", |
557 | bus->secondary, bus->subordinate); | 557 | &bus->busn_res); |
558 | 558 | ||
559 | if (type & IORESOURCE_IO) | 559 | if (type & IORESOURCE_IO) |
560 | pci_setup_bridge_io(bus); | 560 | pci_setup_bridge_io(bus); |
@@ -745,8 +745,8 @@ static void pbus_size_io(struct pci_bus *bus, resource_size_t min_size, | |||
745 | if (!size0 && !size1) { | 745 | if (!size0 && !size1) { |
746 | if (b_res->start || b_res->end) | 746 | if (b_res->start || b_res->end) |
747 | dev_info(&bus->self->dev, "disabling bridge window " | 747 | dev_info(&bus->self->dev, "disabling bridge window " |
748 | "%pR to [bus %02x-%02x] (unused)\n", b_res, | 748 | "%pR to %pR (unused)\n", b_res, |
749 | bus->secondary, bus->subordinate); | 749 | &bus->busn_res); |
750 | b_res->flags = 0; | 750 | b_res->flags = 0; |
751 | return; | 751 | return; |
752 | } | 752 | } |
@@ -757,8 +757,8 @@ static void pbus_size_io(struct pci_bus *bus, resource_size_t min_size, | |||
757 | if (size1 > size0 && realloc_head) { | 757 | if (size1 > size0 && realloc_head) { |
758 | add_to_list(realloc_head, bus->self, b_res, size1-size0, 4096); | 758 | add_to_list(realloc_head, bus->self, b_res, size1-size0, 4096); |
759 | dev_printk(KERN_DEBUG, &bus->self->dev, "bridge window " | 759 | dev_printk(KERN_DEBUG, &bus->self->dev, "bridge window " |
760 | "%pR to [bus %02x-%02x] add_size %lx\n", b_res, | 760 | "%pR to %pR add_size %lx\n", b_res, |
761 | bus->secondary, bus->subordinate, size1-size0); | 761 | &bus->busn_res, size1-size0); |
762 | } | 762 | } |
763 | } | 763 | } |
764 | 764 | ||
@@ -863,8 +863,8 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, | |||
863 | if (!size0 && !size1) { | 863 | if (!size0 && !size1) { |
864 | if (b_res->start || b_res->end) | 864 | if (b_res->start || b_res->end) |
865 | dev_info(&bus->self->dev, "disabling bridge window " | 865 | dev_info(&bus->self->dev, "disabling bridge window " |
866 | "%pR to [bus %02x-%02x] (unused)\n", b_res, | 866 | "%pR to %pR (unused)\n", b_res, |
867 | bus->secondary, bus->subordinate); | 867 | &bus->busn_res); |
868 | b_res->flags = 0; | 868 | b_res->flags = 0; |
869 | return 1; | 869 | return 1; |
870 | } | 870 | } |
@@ -874,8 +874,8 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, | |||
874 | if (size1 > size0 && realloc_head) { | 874 | if (size1 > size0 && realloc_head) { |
875 | add_to_list(realloc_head, bus->self, b_res, size1-size0, min_align); | 875 | add_to_list(realloc_head, bus->self, b_res, size1-size0, min_align); |
876 | dev_printk(KERN_DEBUG, &bus->self->dev, "bridge window " | 876 | dev_printk(KERN_DEBUG, &bus->self->dev, "bridge window " |
877 | "%pR to [bus %02x-%02x] add_size %llx\n", b_res, | 877 | "%pR to %pR add_size %llx\n", b_res, |
878 | bus->secondary, bus->subordinate, (unsigned long long)size1-size0); | 878 | &bus->busn_res, (unsigned long long)size1-size0); |
879 | } | 879 | } |
880 | return 1; | 880 | return 1; |
881 | } | 881 | } |
diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c index 6e75153c5b4f..24caeaf50529 100644 --- a/drivers/pcmcia/cardbus.c +++ b/drivers/pcmcia/cardbus.c | |||
@@ -73,7 +73,7 @@ int __ref cb_alloc(struct pcmcia_socket *s) | |||
73 | s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0)); | 73 | s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0)); |
74 | pci_fixup_cardbus(bus); | 74 | pci_fixup_cardbus(bus); |
75 | 75 | ||
76 | max = bus->secondary; | 76 | max = bus->busn_res.start; |
77 | for (pass = 0; pass < 2; pass++) | 77 | for (pass = 0; pass < 2; pass++) |
78 | list_for_each_entry(dev, &bus->devices, bus_list) | 78 | list_for_each_entry(dev, &bus->devices, bus_list) |
79 | if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE || | 79 | if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE || |
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index d07f9ac8c41d..667678db1153 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c | |||
@@ -1048,8 +1048,8 @@ static void yenta_config_init(struct yenta_socket *socket) | |||
1048 | config_writeb(socket, PCI_LATENCY_TIMER, 168); | 1048 | config_writeb(socket, PCI_LATENCY_TIMER, 168); |
1049 | config_writel(socket, PCI_PRIMARY_BUS, | 1049 | config_writel(socket, PCI_PRIMARY_BUS, |
1050 | (176 << 24) | /* sec. latency timer */ | 1050 | (176 << 24) | /* sec. latency timer */ |
1051 | (dev->subordinate->subordinate << 16) | /* subordinate bus */ | 1051 | ((unsigned int)dev->subordinate->busn_res.end << 16) | /* subordinate bus */ |
1052 | (dev->subordinate->secondary << 8) | /* secondary bus */ | 1052 | ((unsigned int)dev->subordinate->busn_res.start << 8) | /* secondary bus */ |
1053 | dev->subordinate->primary); /* primary bus */ | 1053 | dev->subordinate->primary); /* primary bus */ |
1054 | 1054 | ||
1055 | /* | 1055 | /* |
@@ -1086,14 +1086,14 @@ static void yenta_fixup_parent_bridge(struct pci_bus *cardbus_bridge) | |||
1086 | struct pci_bus *bridge_to_fix = cardbus_bridge->parent; | 1086 | struct pci_bus *bridge_to_fix = cardbus_bridge->parent; |
1087 | 1087 | ||
1088 | /* Check bus numbers are already set up correctly: */ | 1088 | /* Check bus numbers are already set up correctly: */ |
1089 | if (bridge_to_fix->subordinate >= cardbus_bridge->subordinate) | 1089 | if (bridge_to_fix->busn_res.end >= cardbus_bridge->busn_res.end) |
1090 | return; /* The subordinate number is ok, nothing to do */ | 1090 | return; /* The subordinate number is ok, nothing to do */ |
1091 | 1091 | ||
1092 | if (!bridge_to_fix->parent) | 1092 | if (!bridge_to_fix->parent) |
1093 | return; /* Root bridges are ok */ | 1093 | return; /* Root bridges are ok */ |
1094 | 1094 | ||
1095 | /* stay within the limits of the bus range of the parent: */ | 1095 | /* stay within the limits of the bus range of the parent: */ |
1096 | upper_limit = bridge_to_fix->parent->subordinate; | 1096 | upper_limit = bridge_to_fix->parent->busn_res.end; |
1097 | 1097 | ||
1098 | /* check the bus ranges of all silbling bridges to prevent overlap */ | 1098 | /* check the bus ranges of all silbling bridges to prevent overlap */ |
1099 | list_for_each(tmp, &bridge_to_fix->parent->children) { | 1099 | list_for_each(tmp, &bridge_to_fix->parent->children) { |
@@ -1104,36 +1104,36 @@ static void yenta_fixup_parent_bridge(struct pci_bus *cardbus_bridge) | |||
1104 | * current upper limit, set the new upper limit to | 1104 | * current upper limit, set the new upper limit to |
1105 | * the bus number below the silbling's range: | 1105 | * the bus number below the silbling's range: |
1106 | */ | 1106 | */ |
1107 | if (silbling->secondary > bridge_to_fix->subordinate | 1107 | if (silbling->busn_res.start > bridge_to_fix->busn_res.end |
1108 | && silbling->secondary <= upper_limit) | 1108 | && silbling->busn_res.start <= upper_limit) |
1109 | upper_limit = silbling->secondary - 1; | 1109 | upper_limit = silbling->busn_res.start - 1; |
1110 | } | 1110 | } |
1111 | 1111 | ||
1112 | /* Show that the wanted subordinate number is not possible: */ | 1112 | /* Show that the wanted subordinate number is not possible: */ |
1113 | if (cardbus_bridge->subordinate > upper_limit) | 1113 | if (cardbus_bridge->busn_res.end > upper_limit) |
1114 | dev_printk(KERN_WARNING, &cardbus_bridge->dev, | 1114 | dev_printk(KERN_WARNING, &cardbus_bridge->dev, |
1115 | "Upper limit for fixing this " | 1115 | "Upper limit for fixing this " |
1116 | "bridge's parent bridge: #%02x\n", upper_limit); | 1116 | "bridge's parent bridge: #%02x\n", upper_limit); |
1117 | 1117 | ||
1118 | /* If we have room to increase the bridge's subordinate number, */ | 1118 | /* If we have room to increase the bridge's subordinate number, */ |
1119 | if (bridge_to_fix->subordinate < upper_limit) { | 1119 | if (bridge_to_fix->busn_res.end < upper_limit) { |
1120 | 1120 | ||
1121 | /* use the highest number of the hidden bus, within limits */ | 1121 | /* use the highest number of the hidden bus, within limits */ |
1122 | unsigned char subordinate_to_assign = | 1122 | unsigned char subordinate_to_assign = |
1123 | min(cardbus_bridge->subordinate, upper_limit); | 1123 | min_t(int, cardbus_bridge->busn_res.end, upper_limit); |
1124 | 1124 | ||
1125 | dev_printk(KERN_INFO, &bridge_to_fix->dev, | 1125 | dev_printk(KERN_INFO, &bridge_to_fix->dev, |
1126 | "Raising subordinate bus# of parent " | 1126 | "Raising subordinate bus# of parent " |
1127 | "bus (#%02x) from #%02x to #%02x\n", | 1127 | "bus (#%02x) from #%02x to #%02x\n", |
1128 | bridge_to_fix->number, | 1128 | bridge_to_fix->number, |
1129 | bridge_to_fix->subordinate, subordinate_to_assign); | 1129 | (int)bridge_to_fix->busn_res.end, subordinate_to_assign); |
1130 | 1130 | ||
1131 | /* Save the new subordinate in the bus struct of the bridge */ | 1131 | /* Save the new subordinate in the bus struct of the bridge */ |
1132 | bridge_to_fix->subordinate = subordinate_to_assign; | 1132 | bridge_to_fix->busn_res.end = subordinate_to_assign; |
1133 | 1133 | ||
1134 | /* and update the PCI config space with the new subordinate */ | 1134 | /* and update the PCI config space with the new subordinate */ |
1135 | pci_write_config_byte(bridge_to_fix->self, | 1135 | pci_write_config_byte(bridge_to_fix->self, |
1136 | PCI_SUBORDINATE_BUS, bridge_to_fix->subordinate); | 1136 | PCI_SUBORDINATE_BUS, bridge_to_fix->busn_res.end); |
1137 | } | 1137 | } |
1138 | } | 1138 | } |
1139 | 1139 | ||