diff options
-rw-r--r-- | arch/x86/kernel/mpparse.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 37cb1bda1baf..ae9060cb4481 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -558,6 +558,19 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type) | |||
558 | 558 | ||
559 | static struct mpf_intel *mpf_found; | 559 | static struct mpf_intel *mpf_found; |
560 | 560 | ||
561 | static unsigned long __init get_mpc_size(unsigned long physptr) | ||
562 | { | ||
563 | struct mpc_table *mpc; | ||
564 | unsigned long size; | ||
565 | |||
566 | mpc = early_ioremap(physptr, PAGE_SIZE); | ||
567 | size = mpc->length; | ||
568 | early_iounmap(mpc, PAGE_SIZE); | ||
569 | apic_printk(APIC_VERBOSE, " mpc: %lx-%lx\n", physptr, physptr + size); | ||
570 | |||
571 | return size; | ||
572 | } | ||
573 | |||
561 | /* | 574 | /* |
562 | * Scan the memory blocks for an SMP configuration block. | 575 | * Scan the memory blocks for an SMP configuration block. |
563 | */ | 576 | */ |
@@ -611,12 +624,16 @@ static void __init __get_smp_config(unsigned int early) | |||
611 | construct_default_ISA_mptable(mpf->feature1); | 624 | construct_default_ISA_mptable(mpf->feature1); |
612 | 625 | ||
613 | } else if (mpf->physptr) { | 626 | } else if (mpf->physptr) { |
627 | struct mpc_table *mpc; | ||
628 | unsigned long size; | ||
614 | 629 | ||
630 | size = get_mpc_size(mpf->physptr); | ||
631 | mpc = early_ioremap(mpf->physptr, size); | ||
615 | /* | 632 | /* |
616 | * Read the physical hardware table. Anything here will | 633 | * Read the physical hardware table. Anything here will |
617 | * override the defaults. | 634 | * override the defaults. |
618 | */ | 635 | */ |
619 | if (!smp_read_mpc(phys_to_virt(mpf->physptr), early)) { | 636 | if (!smp_read_mpc(mpc, early)) { |
620 | #ifdef CONFIG_X86_LOCAL_APIC | 637 | #ifdef CONFIG_X86_LOCAL_APIC |
621 | smp_found_config = 0; | 638 | smp_found_config = 0; |
622 | #endif | 639 | #endif |
@@ -624,8 +641,10 @@ static void __init __get_smp_config(unsigned int early) | |||
624 | "BIOS bug, MP table errors detected!...\n"); | 641 | "BIOS bug, MP table errors detected!...\n"); |
625 | printk(KERN_ERR "... disabling SMP support. " | 642 | printk(KERN_ERR "... disabling SMP support. " |
626 | "(tell your hw vendor)\n"); | 643 | "(tell your hw vendor)\n"); |
644 | early_iounmap(mpc, size); | ||
627 | return; | 645 | return; |
628 | } | 646 | } |
647 | early_iounmap(mpc, size); | ||
629 | 648 | ||
630 | if (early) | 649 | if (early) |
631 | return; | 650 | return; |