From: Jiang Liu <jiang.liu@xxxxxxxxxx> For hot-pluggable host bridges present at boot time, pci_mmconfig_insert() will insert resources used by MMCFG items for those host bridges. So avoid redundant call to insert_resource() when pci_mmcfg_insert_resources() is called later. Reported-By: Taku Izumi <izumi.taku@xxxxxxxxxxxxxx> Signed-off-by: Jiang Liu <liuj97@xxxxxxxxx> --- arch/x86/pci/mmconfig-shared.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index f4d9ff9..7bba722 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c @@ -371,8 +371,13 @@ static void __init pci_mmcfg_insert_resources(void) { struct pci_mmcfg_region *cfg; + /* + * Insert resources for MMCFG items if the resource hasn't been + * inserted by pci_mmconfig_insert() yet. + */ list_for_each_entry(cfg, &pci_mmcfg_list, list) - insert_resource(&iomem_resource, &cfg->res); + if (!cfg->res.parent) + insert_resource(&iomem_resource, &cfg->res); /* Mark that the resources have been inserted. */ pci_mmcfg_resources_inserted = 1; -- 1.7.9.5 -- 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