diff options
-rw-r--r-- | arch/x86/pci/mmconfig-shared.c | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 301e325992f6..f799949a08a5 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c | |||
@@ -474,39 +474,38 @@ static int __init is_mmconf_reserved(check_reserved_t is_reserved, | |||
474 | return valid; | 474 | return valid; |
475 | } | 475 | } |
476 | 476 | ||
477 | static int __devinit pci_mmcfg_check_reserved(struct pci_mmcfg_region *cfg, | ||
478 | int early) | ||
479 | { | ||
480 | if (!early && !acpi_disabled) { | ||
481 | if (is_mmconf_reserved(is_acpi_reserved, cfg, 0)) | ||
482 | return 1; | ||
483 | else | ||
484 | printk(KERN_ERR FW_BUG PREFIX | ||
485 | "MMCONFIG at %pR not reserved in " | ||
486 | "ACPI motherboard resources\n", | ||
487 | &cfg->res); | ||
488 | } | ||
489 | |||
490 | /* Don't try to do this check unless configuration | ||
491 | type 1 is available. how about type 2 ?*/ | ||
492 | if (raw_pci_ops) | ||
493 | return is_mmconf_reserved(e820_all_mapped, cfg, 1); | ||
494 | |||
495 | return 0; | ||
496 | } | ||
497 | |||
477 | static void __init pci_mmcfg_reject_broken(int early) | 498 | static void __init pci_mmcfg_reject_broken(int early) |
478 | { | 499 | { |
479 | struct pci_mmcfg_region *cfg; | 500 | struct pci_mmcfg_region *cfg; |
480 | 501 | ||
481 | list_for_each_entry(cfg, &pci_mmcfg_list, list) { | 502 | list_for_each_entry(cfg, &pci_mmcfg_list, list) { |
482 | int valid = 0; | 503 | if (pci_mmcfg_check_reserved(cfg, early) == 0) { |
483 | 504 | printk(KERN_INFO PREFIX "not using MMCONFIG\n"); | |
484 | if (!early && !acpi_disabled) { | 505 | free_all_mmcfg(); |
485 | valid = is_mmconf_reserved(is_acpi_reserved, cfg, 0); | 506 | return; |
486 | |||
487 | if (valid) | ||
488 | continue; | ||
489 | else | ||
490 | printk(KERN_ERR FW_BUG PREFIX | ||
491 | "MMCONFIG at %pR not reserved in " | ||
492 | "ACPI motherboard resources\n", | ||
493 | &cfg->res); | ||
494 | } | 507 | } |
495 | |||
496 | /* Don't try to do this check unless configuration | ||
497 | type 1 is available. how about type 2 ?*/ | ||
498 | if (raw_pci_ops) | ||
499 | valid = is_mmconf_reserved(e820_all_mapped, cfg, 1); | ||
500 | |||
501 | if (!valid) | ||
502 | goto reject; | ||
503 | } | 508 | } |
504 | |||
505 | return; | ||
506 | |||
507 | reject: | ||
508 | printk(KERN_INFO PREFIX "not using MMCONFIG\n"); | ||
509 | free_all_mmcfg(); | ||
510 | } | 509 | } |
511 | 510 | ||
512 | static int __initdata known_bridge; | 511 | static int __initdata known_bridge; |