Skip to content

Commit 661c4c4

Browse files
parakabjorn-helgaas
authored andcommitted
PCI: Let pcibios_root_bridge_prepare() access bridge->windows
When pci_register_host_bridge() is called, bridge->windows are already available. However these windows are being moved temporarily from there. To let pcibios_root_bridge_prepare() have access to these windows, move the windows movement after calling this function. This is useful for the MIPS ralink mt7621 platform so it can set up I/O coherence units and avoid custom MIPS code in the mt7621 PCIe controller driver. Link: https://lore.kernel.org/r/20211207104924.21327-2-sergio.paracuellos@gmail.com Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
1 parent da48157 commit 661c4c4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/pci/probe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -898,8 +898,6 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
898898

899899
bridge->bus = bus;
900900

901-
/* Temporarily move resources off the list */
902-
list_splice_init(&bridge->windows, &resources);
903901
bus->sysdata = bridge->sysdata;
904902
bus->ops = bridge->ops;
905903
bus->number = bus->busn_res.start = bridge->busnr;
@@ -925,6 +923,8 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
925923
if (err)
926924
goto free;
927925

926+
/* Temporarily move resources off the list */
927+
list_splice_init(&bridge->windows, &resources);
928928
err = device_add(&bridge->dev);
929929
if (err) {
930930
put_device(&bridge->dev);

0 commit comments

Comments
 (0)