Thread (8 messages) 8 messages, 4 authors, 2012-04-02

Re: [PATCH 08/18] PCI, powerpc: Register busn_res for root buses

flat view

From: Bjorn Helgaas <bhelgaas@google.com>
Date: 2012-02-28 05:37:12
Also in: linux-arch, linux-pci, lkml

On Mon, Feb 27, 2012 at 7:09 PM, Yinghai Lu [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <redacted>
Cc: linuxppc-dev@lists.ozlabs.org
---
=A0arch/powerpc/kernel/pci-common.c | =A0 =A07 ++++++-
=A01 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-c=
ommon.c
quoted hunk ↗ jump to hunk
index 910b9de..ae5ae5f 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -1660,6 +1660,8 @@ void __devinit pcibios_scan_phb(struct pci_controll=
er *hose)
=A0 =A0 =A0 =A0bus->secondary =3D hose->first_busno;
=A0 =A0 =A0 =A0hose->bus =3D bus;

+ =A0 =A0 =A0 pci_bus_insert_busn_res(bus, hose->first_busno, hose->last_=
busno);
quoted hunk ↗ jump to hunk
+
=A0 =A0 =A0 =A0/* Get probe mode and perform scan */
=A0 =A0 =A0 =A0mode =3D PCI_PROBE_NORMAL;
=A0 =A0 =A0 =A0if (node && ppc_md.pci_probe_mode)
@@ -1670,8 +1672,11 @@ void __devinit pcibios_scan_phb(struct pci_control=
ler *hose)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0of_scan_bus(node, bus);
=A0 =A0 =A0 =A0}

- =A0 =A0 =A0 if (mode =3D=3D PCI_PROBE_NORMAL)
+ =A0 =A0 =A0 if (mode =3D=3D PCI_PROBE_NORMAL) {
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 pci_bus_update_busn_res_end(bus, 255);
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0hose->last_busno =3D bus->subordinate =3D =
pci_scan_child_bus(bus);
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 pci_bus_update_busn_res_end(bus, bus->subor=
dinate);
+ =A0 =A0 =A0 }
There's a lot of powerpc code that does this:

    bus_range =3D of_get_property(pcictrl, "bus-range", &len);
    hose->first_busno =3D bus_range[0];
    hose->last_busno =3D bus_range[1];

That *looks* like it is discovering the bus number aperture.  Is it?
If it is, why are we using the largest bus number found by
pci_scan_child_bus() rather than "last_busno"?

Bjorn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help