aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/mpparse_32.c
diff options
context:
space:
mode:
authorAlexey Starikovskiy <astarikovskiy@suse.de>2008-04-04 15:42:46 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:41:36 -0400
commit92fd4b7abdb2b5b85d73ca0adbb6ad3f8b79f805 (patch)
tree31ae3c816b14db6c1b305e074657eb732e719107 /arch/x86/kernel/mpparse_32.c
parent4421b1c8b9f5da24f8c737ede2c05d399dea2015 (diff)
x86: unify smp_scan_config
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/mpparse_32.c')
-rw-r--r--arch/x86/kernel/mpparse_32.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/arch/x86/kernel/mpparse_32.c b/arch/x86/kernel/mpparse_32.c
index bc2000ee0391..7feafa5040d8 100644
--- a/arch/x86/kernel/mpparse_32.c
+++ b/arch/x86/kernel/mpparse_32.c
@@ -683,12 +683,13 @@ void __init get_smp_config(void)
683static int __init smp_scan_config(unsigned long base, unsigned long length, 683static int __init smp_scan_config(unsigned long base, unsigned long length,
684 unsigned reserve) 684 unsigned reserve)
685{ 685{
686 unsigned long *bp = phys_to_virt(base); 686 extern void __bad_mpf_size(void);
687 unsigned int *bp = phys_to_virt(base);
687 struct intel_mp_floating *mpf; 688 struct intel_mp_floating *mpf;
688 689
689 printk(KERN_INFO "Scan SMP from %p for %ld bytes.\n", bp, length); 690 Dprintk("Scan SMP from %p for %ld bytes.\n", bp, length);
690 if (sizeof(*mpf) != 16) 691 if (sizeof(*mpf) != 16)
691 printk("Error: MPF size\n"); 692 __bad_mpf_size();
692 693
693 while (length > 0) { 694 while (length > 0) {
694 mpf = (struct intel_mp_floating *)bp; 695 mpf = (struct intel_mp_floating *)bp;
@@ -699,6 +700,8 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,
699 || (mpf->mpf_specification == 4))) { 700 || (mpf->mpf_specification == 4))) {
700 701
701 smp_found_config = 1; 702 smp_found_config = 1;
703 mpf_found = mpf;
704#ifdef CONFIG_X86_32
702 printk(KERN_INFO "found SMP MP-table at [%p] %08lx\n", 705 printk(KERN_INFO "found SMP MP-table at [%p] %08lx\n",
703 mpf, virt_to_phys(mpf)); 706 mpf, virt_to_phys(mpf));
704 reserve_bootmem(virt_to_phys(mpf), PAGE_SIZE, 707 reserve_bootmem(virt_to_phys(mpf), PAGE_SIZE,
@@ -721,8 +724,16 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,
721 BOOTMEM_DEFAULT); 724 BOOTMEM_DEFAULT);
722 } 725 }
723 726
724 mpf_found = mpf; 727#else
725 return 1; 728 if (!reserve)
729 return 1;
730
731 reserve_bootmem_generic(virt_to_phys(mpf), PAGE_SIZE);
732 if (mpf->mpf_physptr)
733 reserve_bootmem_generic(mpf->mpf_physptr,
734 PAGE_SIZE);
735#endif
736 return 1;
726 } 737 }
727 bp += 4; 738 bp += 4;
728 length -= 16; 739 length -= 16;