diff options
| author | Yinghai Lu <yinghai@kernel.org> | 2012-05-17 21:51:11 -0400 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-06-13 17:42:22 -0400 |
| commit | b918c62e086b2130a7bae44110ca516ef10bfe5a (patch) | |
| tree | e4aee0e76da9a6ddd2d787de63f4ae7ad4d10e59 /drivers | |
| parent | 92f02430934ca1c1e991a1ab3541880575042697 (diff) | |
PCI: replace struct pci_bus secondary/subordinate with busn_res
Replace the struct pci_bus secondary/subordinate members with the
struct resource busn_res. Later we'll build a resource tree of these
bus numbers.
[bhelgaas: changelog]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/iommu/intel-iommu.c | 2 | ||||
| -rw-r--r-- | drivers/net/ethernet/broadcom/tg3.c | 4 | ||||
| -rw-r--r-- | drivers/parisc/dino.c | 10 | ||||
| -rw-r--r-- | drivers/parisc/iosapic.c | 2 | ||||
| -rw-r--r-- | drivers/parisc/lba_pci.c | 22 | ||||
| -rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 8 | ||||
| -rw-r--r-- | drivers/pci/hotplug/cpci_hotplug_pci.c | 6 | ||||
| -rw-r--r-- | drivers/pci/hotplug/pciehp_pci.c | 4 | ||||
| -rw-r--r-- | drivers/pci/hotplug/shpchp_pci.c | 6 | ||||
| -rw-r--r-- | drivers/pci/hotplug/shpchp_sysfs.c | 6 | ||||
| -rw-r--r-- | drivers/pci/iov.c | 4 | ||||
| -rw-r--r-- | drivers/pci/pci.c | 2 | ||||
| -rw-r--r-- | drivers/pci/probe.c | 58 | ||||
| -rw-r--r-- | drivers/pci/setup-bus.c | 24 | ||||
| -rw-r--r-- | drivers/pcmcia/cardbus.c | 2 | ||||
| -rw-r--r-- | drivers/pcmcia/yenta_socket.c | 26 |
16 files changed, 93 insertions, 93 deletions
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- |
