Commit ebd60cd6 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

x86: unify using pci_mmcfg_insert_resource

even with known_bridge insert them late too.
Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent fac8f1e4
...@@ -209,7 +209,7 @@ static int __init pci_mmcfg_check_hostbridge(void) ...@@ -209,7 +209,7 @@ static int __init pci_mmcfg_check_hostbridge(void)
return name != NULL; return name != NULL;
} }
static void __init pci_mmcfg_insert_resources(unsigned long resource_flags) static void __init pci_mmcfg_insert_resources(void)
{ {
#define PCI_MMCFG_RESOURCE_NAME_LEN 19 #define PCI_MMCFG_RESOURCE_NAME_LEN 19
int i; int i;
...@@ -233,7 +233,7 @@ static void __init pci_mmcfg_insert_resources(unsigned long resource_flags) ...@@ -233,7 +233,7 @@ static void __init pci_mmcfg_insert_resources(unsigned long resource_flags)
cfg->pci_segment); cfg->pci_segment);
res->start = cfg->address; res->start = cfg->address;
res->end = res->start + (num_buses << 20) - 1; res->end = res->start + (num_buses << 20) - 1;
res->flags = IORESOURCE_MEM | resource_flags; res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
insert_resource(&iomem_resource, res); insert_resource(&iomem_resource, res);
names += PCI_MMCFG_RESOURCE_NAME_LEN; names += PCI_MMCFG_RESOURCE_NAME_LEN;
} }
...@@ -434,11 +434,9 @@ static void __init __pci_mmcfg_init(int early) ...@@ -434,11 +434,9 @@ static void __init __pci_mmcfg_init(int early)
(pci_mmcfg_config[0].address == 0)) (pci_mmcfg_config[0].address == 0))
return; return;
if (pci_mmcfg_arch_init()) { if (pci_mmcfg_arch_init())
if (known_bridge)
pci_mmcfg_insert_resources(IORESOURCE_BUSY);
pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
} else { else {
/* /*
* Signal not to attempt to insert mmcfg resources because * Signal not to attempt to insert mmcfg resources because
* the architecture mmcfg setup could not initialize. * the architecture mmcfg setup could not initialize.
...@@ -475,7 +473,7 @@ static int __init pci_mmcfg_late_insert_resources(void) ...@@ -475,7 +473,7 @@ static int __init pci_mmcfg_late_insert_resources(void)
* marked so it won't cause request errors when __request_region is * marked so it won't cause request errors when __request_region is
* called. * called.
*/ */
pci_mmcfg_insert_resources(0); pci_mmcfg_insert_resources();
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment