diff options
-rw-r--r-- | platforms/ibm-fsp/firenze.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/platforms/ibm-fsp/firenze.c b/platforms/ibm-fsp/firenze.c index c0a13c0..300b4ff 100644 --- a/platforms/ibm-fsp/firenze.c +++ b/platforms/ibm-fsp/firenze.c @@ -51,6 +51,8 @@ static struct fsp_pcie_inventory *fsp_pcie_inv; static unsigned int fsp_pcie_inv_alloc_count; #define FSP_PCIE_INV_ALLOC_CHUNK 4 +struct lock fsp_pcie_inv_lock = LOCK_UNLOCKED; + static bool firenze_probe(void) { return dt_node_is_compatible(dt_root, "ibm,firenze"); @@ -218,7 +220,9 @@ static void firenze_get_slot_info(struct phb *phb, struct pci_device * pd) return; if (!pd->parent->slot_info->pluggable) return; + lock(&fsp_pcie_inv_lock); firenze_add_pcidev_to_fsp_inventory(phb, pd); + unlock(&fsp_pcie_inv_lock); } static void firenze_setup_phb(struct phb *phb, unsigned int index) |