Commit ebd60cd64f8ab1170102c3ab072eb73042b7a33d

Authored by Yinghai Lu
Committed by Ingo Molnar
1 parent fac8f1e4f9

x86: unify using pci_mmcfg_insert_resource

even with known_bridge insert them late too.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Showing 1 changed file with 5 additions and 7 deletions Side-by-side Diff

arch/x86/pci/mmconfig-shared.c
... ... @@ -209,7 +209,7 @@
209 209 return name != NULL;
210 210 }
211 211  
212   -static void __init pci_mmcfg_insert_resources(unsigned long resource_flags)
  212 +static void __init pci_mmcfg_insert_resources(void)
213 213 {
214 214 #define PCI_MMCFG_RESOURCE_NAME_LEN 19
215 215 int i;
... ... @@ -233,7 +233,7 @@
233 233 cfg->pci_segment);
234 234 res->start = cfg->address;
235 235 res->end = res->start + (num_buses << 20) - 1;
236   - res->flags = IORESOURCE_MEM | resource_flags;
  236 + res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
237 237 insert_resource(&iomem_resource, res);
238 238 names += PCI_MMCFG_RESOURCE_NAME_LEN;
239 239 }
240 240  
... ... @@ -434,11 +434,9 @@
434 434 (pci_mmcfg_config[0].address == 0))
435 435 return;
436 436  
437   - if (pci_mmcfg_arch_init()) {
438   - if (known_bridge)
439   - pci_mmcfg_insert_resources(IORESOURCE_BUSY);
  437 + if (pci_mmcfg_arch_init())
440 438 pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
441   - } else {
  439 + else {
442 440 /*
443 441 * Signal not to attempt to insert mmcfg resources because
444 442 * the architecture mmcfg setup could not initialize.
... ... @@ -475,7 +473,7 @@
475 473 * marked so it won't cause request errors when __request_region is
476 474 * called.
477 475 */
478   - pci_mmcfg_insert_resources(0);
  476 + pci_mmcfg_insert_resources();
479 477  
480 478 return 0;
481 479 }