[PATCH v5 6/8] powerpc/pci: Don't rely on DT is the PCI_REASSIGN_ALL_BUS is set
Sergey Miroshnichenko
s.miroshnichenko at yadro.com
Mon Mar 11 22:52:31 AEDT 2019
If supported by the platform, endpoint's pci_dn can be created dynamically,
without need to wait for DT updates from the firmware.
Signed-off-by: Sergey Miroshnichenko <s.miroshnichenko at yadro.com>
---
arch/powerpc/kernel/pci_dn.c | 6 ++++--
arch/powerpc/platforms/powernv/eeh-powernv.c | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c
index 7fa362f8038d..17362a9b4678 100644
--- a/arch/powerpc/kernel/pci_dn.c
+++ b/arch/powerpc/kernel/pci_dn.c
@@ -555,8 +555,10 @@ void pci_devs_phb_init_dynamic(struct pci_controller *phb)
phb->pci_data = pdn;
}
- /* Update dn->phb ptrs for new phb and children devices */
- pci_traverse_device_nodes(dn, add_pdn, phb);
+ if (!pci_has_flag(PCI_REASSIGN_ALL_BUS)) {
+ /* Update dn->phb ptrs for new phb and children devices */
+ pci_traverse_device_nodes(dn, add_pdn, phb);
+ }
}
/**
diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c
index f38078976c5d..40feff2653a0 100644
--- a/arch/powerpc/platforms/powernv/eeh-powernv.c
+++ b/arch/powerpc/platforms/powernv/eeh-powernv.c
@@ -47,7 +47,7 @@ void pnv_pcibios_bus_add_device(struct pci_dev *pdev)
{
struct pci_dn *pdn = pci_get_pdn(pdev);
- if (!pdev->is_virtfn)
+ if (!pci_has_flag(PCI_REASSIGN_ALL_BUS) && !pdev->is_virtfn)
return;
/*
--
2.20.1
More information about the Linuxppc-dev
mailing list