diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/pci/mmconfig-shared.c | 46 | ||||
-rw-r--r-- | arch/x86/pci/mmconfig_64.c | 12 |
2 files changed, 26 insertions, 32 deletions
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 392f8fe16955..71d69b88fa33 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c | |||
@@ -90,6 +90,10 @@ static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start, | |||
90 | "PCI MMCONFIG %04x [bus %02x-%02x]", segment, start, end); | 90 | "PCI MMCONFIG %04x [bus %02x-%02x]", segment, start, end); |
91 | res->name = new->name; | 91 | res->name = new->name; |
92 | 92 | ||
93 | printk(KERN_INFO PREFIX "MMCONFIG for domain %04x [bus %02x-%02x] at " | ||
94 | "%pR (base %#lx)\n", segment, start, end, &new->res, | ||
95 | (unsigned long) addr); | ||
96 | |||
93 | return new; | 97 | return new; |
94 | } | 98 | } |
95 | 99 | ||
@@ -333,7 +337,7 @@ static int __init pci_mmcfg_check_hostbridge(void) | |||
333 | name = pci_mmcfg_probes[i].probe(); | 337 | name = pci_mmcfg_probes[i].probe(); |
334 | 338 | ||
335 | if (name) | 339 | if (name) |
336 | printk(KERN_INFO "PCI: Found %s with MMCONFIG support.\n", | 340 | printk(KERN_INFO PREFIX "%s with MMCONFIG support\n", |
337 | name); | 341 | name); |
338 | } | 342 | } |
339 | 343 | ||
@@ -425,7 +429,7 @@ static int __init is_acpi_reserved(u64 start, u64 end, unsigned not_used) | |||
425 | typedef int (*check_reserved_t)(u64 start, u64 end, unsigned type); | 429 | typedef int (*check_reserved_t)(u64 start, u64 end, unsigned type); |
426 | 430 | ||
427 | static int __init is_mmconf_reserved(check_reserved_t is_reserved, | 431 | static int __init is_mmconf_reserved(check_reserved_t is_reserved, |
428 | int i, struct pci_mmcfg_region *cfg, int with_e820) | 432 | struct pci_mmcfg_region *cfg, int with_e820) |
429 | { | 433 | { |
430 | u64 addr = cfg->res.start; | 434 | u64 addr = cfg->res.start; |
431 | u64 size = resource_size(&cfg->res); | 435 | u64 size = resource_size(&cfg->res); |
@@ -439,9 +443,9 @@ static int __init is_mmconf_reserved(check_reserved_t is_reserved, | |||
439 | } | 443 | } |
440 | 444 | ||
441 | if (size >= (16UL<<20) || size == old_size) { | 445 | if (size >= (16UL<<20) || size == old_size) { |
442 | printk(KERN_NOTICE | 446 | printk(KERN_INFO PREFIX "MMCONFIG at %pR reserved in %s\n", |
443 | "PCI: MCFG area at %Lx reserved in %s\n", | 447 | &cfg->res, |
444 | addr, with_e820?"E820":"ACPI motherboard resources"); | 448 | with_e820 ? "E820" : "ACPI motherboard resources"); |
445 | valid = 1; | 449 | valid = 1; |
446 | 450 | ||
447 | if (old_size != size) { | 451 | if (old_size != size) { |
@@ -453,11 +457,11 @@ static int __init is_mmconf_reserved(check_reserved_t is_reserved, | |||
453 | snprintf(cfg->name, PCI_MMCFG_RESOURCE_NAME_LEN, | 457 | snprintf(cfg->name, PCI_MMCFG_RESOURCE_NAME_LEN, |
454 | "PCI MMCONFIG %04x [bus %02x-%02x]", | 458 | "PCI MMCONFIG %04x [bus %02x-%02x]", |
455 | cfg->segment, cfg->start_bus, cfg->end_bus); | 459 | cfg->segment, cfg->start_bus, cfg->end_bus); |
456 | printk(KERN_NOTICE "PCI: updated MCFG configuration %d: base %lx " | 460 | printk(KERN_INFO PREFIX |
457 | "segment %hu buses %u - %u\n", | 461 | "MMCONFIG for %04x [bus%02x-%02x] " |
458 | i, (unsigned long)cfg->address, cfg->segment, | 462 | "at %pR (base %#lx) (size reduced!)\n", |
459 | (unsigned int)cfg->start_bus, | 463 | cfg->segment, cfg->start_bus, cfg->end_bus, |
460 | (unsigned int)cfg->end_bus); | 464 | &cfg->res, (unsigned long) cfg->address); |
461 | } | 465 | } |
462 | } | 466 | } |
463 | 467 | ||
@@ -467,33 +471,25 @@ static int __init is_mmconf_reserved(check_reserved_t is_reserved, | |||
467 | static void __init pci_mmcfg_reject_broken(int early) | 471 | static void __init pci_mmcfg_reject_broken(int early) |
468 | { | 472 | { |
469 | struct pci_mmcfg_region *cfg; | 473 | struct pci_mmcfg_region *cfg; |
470 | int i; | ||
471 | 474 | ||
472 | list_for_each_entry(cfg, &pci_mmcfg_list, list) { | 475 | list_for_each_entry(cfg, &pci_mmcfg_list, list) { |
473 | int valid = 0; | 476 | int valid = 0; |
474 | 477 | ||
475 | printk(KERN_NOTICE "PCI: MCFG configuration %d: base %lx " | ||
476 | "segment %hu buses %u - %u\n", | ||
477 | i, (unsigned long)cfg->address, cfg->segment, | ||
478 | (unsigned int)cfg->start_bus, | ||
479 | (unsigned int)cfg->end_bus); | ||
480 | i++; | ||
481 | |||
482 | if (!early && !acpi_disabled) | 478 | if (!early && !acpi_disabled) |
483 | valid = is_mmconf_reserved(is_acpi_reserved, i, cfg, 0); | 479 | valid = is_mmconf_reserved(is_acpi_reserved, cfg, 0); |
484 | 480 | ||
485 | if (valid) | 481 | if (valid) |
486 | continue; | 482 | continue; |
487 | 483 | ||
488 | if (!early) | 484 | if (!early) |
489 | printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %Lx is not" | 485 | printk(KERN_ERR FW_BUG PREFIX |
490 | " reserved in ACPI motherboard resources\n", | 486 | "MMCONFIG at %pR not reserved in " |
491 | cfg->address); | 487 | "ACPI motherboard resources\n", &cfg->res); |
492 | 488 | ||
493 | /* Don't try to do this check unless configuration | 489 | /* Don't try to do this check unless configuration |
494 | type 1 is available. how about type 2 ?*/ | 490 | type 1 is available. how about type 2 ?*/ |
495 | if (raw_pci_ops) | 491 | if (raw_pci_ops) |
496 | valid = is_mmconf_reserved(e820_all_mapped, i, cfg, 1); | 492 | valid = is_mmconf_reserved(e820_all_mapped, cfg, 1); |
497 | 493 | ||
498 | if (!valid) | 494 | if (!valid) |
499 | goto reject; | 495 | goto reject; |
@@ -502,7 +498,7 @@ static void __init pci_mmcfg_reject_broken(int early) | |||
502 | return; | 498 | return; |
503 | 499 | ||
504 | reject: | 500 | reject: |
505 | printk(KERN_INFO "PCI: Not using MMCONFIG.\n"); | 501 | printk(KERN_INFO PREFIX "not using MMCONFIG\n"); |
506 | free_all_mmcfg(); | 502 | free_all_mmcfg(); |
507 | } | 503 | } |
508 | 504 | ||
@@ -525,7 +521,7 @@ static int __init acpi_mcfg_check_entry(struct acpi_table_mcfg *mcfg, | |||
525 | return 0; | 521 | return 0; |
526 | } | 522 | } |
527 | 523 | ||
528 | printk(KERN_ERR PREFIX "MCFG region for %04x:%02x-%02x at %#llx " | 524 | printk(KERN_ERR PREFIX "MCFG region for %04x [bus %02x-%02x] at %#llx " |
529 | "is above 4GB, ignored\n", cfg->pci_segment, | 525 | "is above 4GB, ignored\n", cfg->pci_segment, |
530 | cfg->start_bus_number, cfg->end_bus_number, cfg->address); | 526 | cfg->start_bus_number, cfg->end_bus_number, cfg->address); |
531 | return -EINVAL; | 527 | return -EINVAL; |
diff --git a/arch/x86/pci/mmconfig_64.c b/arch/x86/pci/mmconfig_64.c index ed1f479b4d0e..cfa6cdb6d262 100644 --- a/arch/x86/pci/mmconfig_64.c +++ b/arch/x86/pci/mmconfig_64.c | |||
@@ -12,6 +12,8 @@ | |||
12 | #include <asm/e820.h> | 12 | #include <asm/e820.h> |
13 | #include <asm/pci_x86.h> | 13 | #include <asm/pci_x86.h> |
14 | 14 | ||
15 | #define PREFIX "PCI: " | ||
16 | |||
15 | static char __iomem *get_virt(unsigned int seg, unsigned bus) | 17 | static char __iomem *get_virt(unsigned int seg, unsigned bus) |
16 | { | 18 | { |
17 | struct pci_mmcfg_region *cfg; | 19 | struct pci_mmcfg_region *cfg; |
@@ -109,11 +111,8 @@ static void __iomem * __init mcfg_ioremap(struct pci_mmcfg_region *cfg) | |||
109 | num_buses = cfg->end_bus - cfg->start_bus + 1; | 111 | num_buses = cfg->end_bus - cfg->start_bus + 1; |
110 | size = PCI_MMCFG_BUS_OFFSET(num_buses); | 112 | size = PCI_MMCFG_BUS_OFFSET(num_buses); |
111 | addr = ioremap_nocache(start, size); | 113 | addr = ioremap_nocache(start, size); |
112 | if (addr) { | 114 | if (addr) |
113 | printk(KERN_INFO "PCI: Using MMCONFIG at %Lx - %Lx\n", | ||
114 | start, start + size - 1); | ||
115 | addr -= PCI_MMCFG_BUS_OFFSET(cfg->start_bus); | 115 | addr -= PCI_MMCFG_BUS_OFFSET(cfg->start_bus); |
116 | } | ||
117 | return addr; | 116 | return addr; |
118 | } | 117 | } |
119 | 118 | ||
@@ -124,9 +123,8 @@ int __init pci_mmcfg_arch_init(void) | |||
124 | list_for_each_entry(cfg, &pci_mmcfg_list, list) { | 123 | list_for_each_entry(cfg, &pci_mmcfg_list, list) { |
125 | cfg->virt = mcfg_ioremap(cfg); | 124 | cfg->virt = mcfg_ioremap(cfg); |
126 | if (!cfg->virt) { | 125 | if (!cfg->virt) { |
127 | printk(KERN_ERR "PCI: Cannot map mmconfig aperture for " | 126 | printk(KERN_ERR PREFIX "can't map MMCONFIG at %pR\n", |
128 | "segment %d\n", | 127 | &cfg->res); |
129 | cfg->segment); | ||
130 | pci_mmcfg_arch_free(); | 128 | pci_mmcfg_arch_free(); |
131 | return 0; | 129 | return 0; |
132 | } | 130 | } |