On Mon, Sep 26, 2011 at 3:40 PM, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> wrote: > On Mon, 2011-09-26 at 09:54 -0500, Jon Mason wrote: >> Rework the pcie_bus_configure_settings to not include an MPS suggestion >> from the root port and simply use the root port MPSS as a starting point >> (thus removing the need to pass around the info and making the call >> simplier). > > Jesse, please keep that one on the back burner as it will clash with > powerpc-next, ideally we should merge it -after- the previous one & > powerpc-next are up. Either that or we can put all 3 patches from Jon > into a separate git branch which both you and I pull. I'm fine with patches #2 and #3 being tabled for the 3.2 or later, but patch #1 really should go into 3.1-rcX and 3.0-stable (in case anyone is crazy enough to try the "performance" option). Thanks, Jon > > Your call. > > Cheers, > Ben. > >> Signed-off-by: Jon Mason <mason@xxxxxxxx> >> --- >> arch/x86/pci/acpi.c | 11 +---------- >> drivers/pci/hotplug/pcihp_slot.c | 4 +--- >> drivers/pci/probe.c | 19 ++++++++++++++++--- >> include/linux/pci.h | 3 ++- >> 4 files changed, 20 insertions(+), 17 deletions(-) >> >> diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c >> index 039d913..d3b85fb 100644 >> --- a/arch/x86/pci/acpi.c >> +++ b/arch/x86/pci/acpi.c >> @@ -363,16 +363,7 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_pci_root *root) >> /* After the PCI-E bus has been walked and all devices discovered, >> * configure any settings of the fabric that might be necessary. >> */ >> - if (bus) { >> - struct pci_bus *child; >> - list_for_each_entry(child, &bus->children, node) { >> - struct pci_dev *self = child->self; >> - if (!self) >> - continue; >> - >> - pcie_bus_configure_settings(child, self->pcie_mpss); >> - } >> - } >> + pcie_bus_configure_settings_root(bus); >> >> if (!bus) >> kfree(sd); >> diff --git a/drivers/pci/hotplug/pcihp_slot.c b/drivers/pci/hotplug/pcihp_slot.c >> index 3ffd9c1..37dfae0 100644 >> --- a/drivers/pci/hotplug/pcihp_slot.c >> +++ b/drivers/pci/hotplug/pcihp_slot.c >> @@ -169,9 +169,7 @@ void pci_configure_slot(struct pci_dev *dev) >> (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI))) >> return; >> >> - if (dev->bus && dev->bus->self) >> - pcie_bus_configure_settings(dev->bus, >> - dev->bus->self->pcie_mpss); >> + pcie_bus_configure_settings(dev->bus); >> >> memset(&hpp, 0, sizeof(hpp)); >> ret = pci_get_hp_params(dev, &hpp); >> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c >> index a919db2..e85f994 100644 >> --- a/drivers/pci/probe.c >> +++ b/drivers/pci/probe.c >> @@ -1449,14 +1449,16 @@ static int pcie_bus_configure_set(struct pci_dev *dev, void *data) >> * parents then children fashion. If this changes, then this code will not >> * work as designed. >> */ >> -void pcie_bus_configure_settings(struct pci_bus *bus, u8 mpss) >> +void pcie_bus_configure_settings(struct pci_bus *bus) >> { >> - u8 smpss = mpss; >> + u8 smpss; >> >> - if (!pci_is_pcie(bus->self)) >> + if (!bus || !bus->self || !pci_is_pcie(bus->self)) >> return; >> >> if (pcie_bus_config == PCIE_BUS_SAFE) { >> + smpss = bus->self->pcie_mpss; >> + >> pcie_find_smpss(bus->self, &smpss); >> pci_walk_bus(bus, pcie_find_smpss, &smpss); >> } >> @@ -1466,6 +1468,17 @@ void pcie_bus_configure_settings(struct pci_bus *bus, u8 mpss) >> } >> EXPORT_SYMBOL_GPL(pcie_bus_configure_settings); >> >> +void pcie_bus_configure_settings_root(struct pci_bus *bus) >> +{ >> + struct pci_bus *child; >> + >> + if (!bus) >> + return; >> + >> + list_for_each_entry(child, &bus->children, node) >> + pcie_bus_configure_settings(child); >> +} >> + >> unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus) >> { >> unsigned int devfn, pass, max = bus->secondary; >> diff --git a/include/linux/pci.h b/include/linux/pci.h >> index 8c230cb..4d857bf 100644 >> --- a/include/linux/pci.h >> +++ b/include/linux/pci.h >> @@ -618,7 +618,8 @@ struct pci_driver { >> /* these external functions are only available when PCI support is enabled */ >> #ifdef CONFIG_PCI >> >> -extern void pcie_bus_configure_settings(struct pci_bus *bus, u8 smpss); >> +extern void pcie_bus_configure_settings_root(struct pci_bus *bus); >> +extern void pcie_bus_configure_settings(struct pci_bus *bus); >> >> enum pcie_bus_config_types { >> PCIE_BUS_PERFORMANCE, > > > -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html