diff options
Diffstat (limited to 'arch/x86/kernel/mpparse.c')
-rw-r--r-- | arch/x86/kernel/mpparse.c | 54 |
1 files changed, 12 insertions, 42 deletions
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 5be95ef4ffec..e81030f71a8f 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -359,13 +359,6 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early) | |||
359 | x86_init.mpparse.mpc_record(1); | 359 | x86_init.mpparse.mpc_record(1); |
360 | } | 360 | } |
361 | 361 | ||
362 | #ifdef CONFIG_X86_BIGSMP | ||
363 | generic_bigsmp_probe(); | ||
364 | #endif | ||
365 | |||
366 | if (apic->setup_apic_routing) | ||
367 | apic->setup_apic_routing(); | ||
368 | |||
369 | if (!num_processors) | 362 | if (!num_processors) |
370 | printk(KERN_ERR "MPTABLE: no processors registered!\n"); | 363 | printk(KERN_ERR "MPTABLE: no processors registered!\n"); |
371 | return num_processors; | 364 | return num_processors; |
@@ -667,36 +660,18 @@ void __init default_get_smp_config(unsigned int early) | |||
667 | */ | 660 | */ |
668 | } | 661 | } |
669 | 662 | ||
670 | static void __init smp_reserve_bootmem(struct mpf_intel *mpf) | 663 | static void __init smp_reserve_memory(struct mpf_intel *mpf) |
671 | { | 664 | { |
672 | unsigned long size = get_mpc_size(mpf->physptr); | 665 | unsigned long size = get_mpc_size(mpf->physptr); |
673 | #ifdef CONFIG_X86_32 | ||
674 | /* | ||
675 | * We cannot access to MPC table to compute table size yet, | ||
676 | * as only few megabytes from the bottom is mapped now. | ||
677 | * PC-9800's MPC table places on the very last of physical | ||
678 | * memory; so that simply reserving PAGE_SIZE from mpf->physptr | ||
679 | * yields BUG() in reserve_bootmem. | ||
680 | * also need to make sure physptr is below than max_low_pfn | ||
681 | * we don't need reserve the area above max_low_pfn | ||
682 | */ | ||
683 | unsigned long end = max_low_pfn * PAGE_SIZE; | ||
684 | 666 | ||
685 | if (mpf->physptr < end) { | 667 | reserve_early_overlap_ok(mpf->physptr, mpf->physptr+size, "MP-table mpc"); |
686 | if (mpf->physptr + size > end) | ||
687 | size = end - mpf->physptr; | ||
688 | reserve_bootmem_generic(mpf->physptr, size, BOOTMEM_DEFAULT); | ||
689 | } | ||
690 | #else | ||
691 | reserve_bootmem_generic(mpf->physptr, size, BOOTMEM_DEFAULT); | ||
692 | #endif | ||
693 | } | 668 | } |
694 | 669 | ||
695 | static int __init smp_scan_config(unsigned long base, unsigned long length, | 670 | static int __init smp_scan_config(unsigned long base, unsigned long length) |
696 | unsigned reserve) | ||
697 | { | 671 | { |
698 | unsigned int *bp = phys_to_virt(base); | 672 | unsigned int *bp = phys_to_virt(base); |
699 | struct mpf_intel *mpf; | 673 | struct mpf_intel *mpf; |
674 | unsigned long mem; | ||
700 | 675 | ||
701 | apic_printk(APIC_VERBOSE, "Scan SMP from %p for %ld bytes.\n", | 676 | apic_printk(APIC_VERBOSE, "Scan SMP from %p for %ld bytes.\n", |
702 | bp, length); | 677 | bp, length); |
@@ -717,12 +692,10 @@ static int __init smp_scan_config(unsigned long base, unsigned long length, | |||
717 | printk(KERN_INFO "found SMP MP-table at [%p] %llx\n", | 692 | printk(KERN_INFO "found SMP MP-table at [%p] %llx\n", |
718 | mpf, (u64)virt_to_phys(mpf)); | 693 | mpf, (u64)virt_to_phys(mpf)); |
719 | 694 | ||
720 | if (!reserve) | 695 | mem = virt_to_phys(mpf); |
721 | return 1; | 696 | reserve_early_overlap_ok(mem, mem + sizeof(*mpf), "MP-table mpf"); |
722 | reserve_bootmem_generic(virt_to_phys(mpf), sizeof(*mpf), | ||
723 | BOOTMEM_DEFAULT); | ||
724 | if (mpf->physptr) | 697 | if (mpf->physptr) |
725 | smp_reserve_bootmem(mpf); | 698 | smp_reserve_memory(mpf); |
726 | 699 | ||
727 | return 1; | 700 | return 1; |
728 | } | 701 | } |
@@ -732,7 +705,7 @@ static int __init smp_scan_config(unsigned long base, unsigned long length, | |||
732 | return 0; | 705 | return 0; |
733 | } | 706 | } |
734 | 707 | ||
735 | void __init default_find_smp_config(unsigned int reserve) | 708 | void __init default_find_smp_config(void) |
736 | { | 709 | { |
737 | unsigned int address; | 710 | unsigned int address; |
738 | 711 | ||
@@ -744,9 +717,9 @@ void __init default_find_smp_config(unsigned int reserve) | |||
744 | * 2) Scan the top 1K of base RAM | 717 | * 2) Scan the top 1K of base RAM |
745 | * 3) Scan the 64K of bios | 718 | * 3) Scan the 64K of bios |
746 | */ | 719 | */ |
747 | if (smp_scan_config(0x0, 0x400, reserve) || | 720 | if (smp_scan_config(0x0, 0x400) || |
748 | smp_scan_config(639 * 0x400, 0x400, reserve) || | 721 | smp_scan_config(639 * 0x400, 0x400) || |
749 | smp_scan_config(0xF0000, 0x10000, reserve)) | 722 | smp_scan_config(0xF0000, 0x10000)) |
750 | return; | 723 | return; |
751 | /* | 724 | /* |
752 | * If it is an SMP machine we should know now, unless the | 725 | * If it is an SMP machine we should know now, unless the |
@@ -767,7 +740,7 @@ void __init default_find_smp_config(unsigned int reserve) | |||
767 | 740 | ||
768 | address = get_bios_ebda(); | 741 | address = get_bios_ebda(); |
769 | if (address) | 742 | if (address) |
770 | smp_scan_config(address, 0x400, reserve); | 743 | smp_scan_config(address, 0x400); |
771 | } | 744 | } |
772 | 745 | ||
773 | #ifdef CONFIG_X86_IO_APIC | 746 | #ifdef CONFIG_X86_IO_APIC |
@@ -965,9 +938,6 @@ void __init early_reserve_e820_mpc_new(void) | |||
965 | { | 938 | { |
966 | if (enable_update_mptable && alloc_mptable) { | 939 | if (enable_update_mptable && alloc_mptable) { |
967 | u64 startt = 0; | 940 | u64 startt = 0; |
968 | #ifdef CONFIG_X86_TRAMPOLINE | ||
969 | startt = TRAMPOLINE_BASE; | ||
970 | #endif | ||
971 | mpc_new_phys = early_reserve_e820(startt, mpc_new_length, 4); | 941 | mpc_new_phys = early_reserve_e820(startt, mpc_new_length, 4); |
972 | } | 942 | } |
973 | } | 943 | } |