diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-11-13 19:34:59 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-11-24 18:30:30 -0500 |
commit | 8c57786ad3d921713c7ad8e44132aa537a1d0fec (patch) | |
tree | d9efcb06d650ac01987b19e0535c67fbcabcb8f6 /arch/x86/pci/mmconfig-shared.c | |
parent | ba2afbabfc44d6322e8607c004f37868ff786cf8 (diff) |
x86/PCI: MMCONFIG: clean up printks
No functional change; just tidy up printks and make them more consistent
with the rest of PCI.
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/x86/pci/mmconfig-shared.c')
-rw-r--r-- | arch/x86/pci/mmconfig-shared.c | 46 |
1 files changed, 21 insertions, 25 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; |