diff options
Diffstat (limited to 'arch/x86/kernel/mpparse.c')
-rw-r--r-- | arch/x86/kernel/mpparse.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 7ac1b689b70a..b62ac6ba1410 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -859,10 +859,11 @@ static int __init smp_scan_config(unsigned long base, unsigned long length, | |||
859 | 859 | ||
860 | if (!reserve) | 860 | if (!reserve) |
861 | return 1; | 861 | return 1; |
862 | #ifdef CONFIG_X86_32 | 862 | reserve_bootmem_generic(virt_to_phys(mpf), PAGE_SIZE, |
863 | reserve_bootmem(virt_to_phys(mpf), PAGE_SIZE, | ||
864 | BOOTMEM_DEFAULT); | 863 | BOOTMEM_DEFAULT); |
865 | if (mpf->mpf_physptr) { | 864 | if (mpf->mpf_physptr) { |
865 | unsigned long size = PAGE_SIZE; | ||
866 | #ifdef CONFIG_X86_32 | ||
866 | /* | 867 | /* |
867 | * We cannot access to MPC table to compute | 868 | * We cannot access to MPC table to compute |
868 | * table size yet, as only few megabytes from | 869 | * table size yet, as only few megabytes from |
@@ -872,22 +873,15 @@ static int __init smp_scan_config(unsigned long base, unsigned long length, | |||
872 | * PAGE_SIZE from mpg->mpf_physptr yields BUG() | 873 | * PAGE_SIZE from mpg->mpf_physptr yields BUG() |
873 | * in reserve_bootmem. | 874 | * in reserve_bootmem. |
874 | */ | 875 | */ |
875 | unsigned long size = PAGE_SIZE; | ||
876 | unsigned long end = max_low_pfn * PAGE_SIZE; | 876 | unsigned long end = max_low_pfn * PAGE_SIZE; |
877 | if (mpf->mpf_physptr + size > end) | 877 | if (mpf->mpf_physptr + size > end) |
878 | size = end - mpf->mpf_physptr; | 878 | size = end - mpf->mpf_physptr; |
879 | reserve_bootmem(mpf->mpf_physptr, size, | 879 | #endif |
880 | reserve_bootmem_generic(mpf->mpf_physptr, size, | ||
880 | BOOTMEM_DEFAULT); | 881 | BOOTMEM_DEFAULT); |
881 | } | 882 | } |
882 | 883 | ||
883 | #else | 884 | return 1; |
884 | reserve_bootmem_generic(virt_to_phys(mpf), PAGE_SIZE, | ||
885 | BOOTMEM_DEFAULT); | ||
886 | if (mpf->mpf_physptr) | ||
887 | reserve_bootmem_generic(mpf->mpf_physptr, | ||
888 | PAGE_SIZE, BOOTMEM_DEFAULT); | ||
889 | #endif | ||
890 | return 1; | ||
891 | } | 885 | } |
892 | bp += 4; | 886 | bp += 4; |
893 | length -= 16; | 887 | length -= 16; |