aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-05-17 21:51:11 -0400
committerBjorn Helgaas <bhelgaas@google.com>2012-06-13 17:42:22 -0400
commitb918c62e086b2130a7bae44110ca516ef10bfe5a (patch)
treee4aee0e76da9a6ddd2d787de63f4ae7ad4d10e59 /arch/powerpc
parent92f02430934ca1c1e991a1ab3541880575042697 (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 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/pci-common.c6
-rw-r--r--arch/powerpc/kernel/pci_64.c2
-rw-r--r--arch/powerpc/kernel/pci_of_scan.c2
-rw-r--r--arch/powerpc/platforms/powernv/pci-ioda.c8
-rw-r--r--arch/powerpc/platforms/pseries/pci_dlpar.c2
5 files changed, 10 insertions, 10 deletions
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 ||