summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/mpparse_64.c
diff options
context:
space:
mode:
authorAlexey Starikovskiy <astarikovskiy@suse.de>2008-04-04 23:42:46 +0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 17:41:36 +0200
commit92fd4b7abdb2b5b85d73ca0adbb6ad3f8b79f805 (patch)
tree31ae3c816b14db6c1b305e074657eb732e719107 /arch/x86/kernel/mpparse_64.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_64.c')
-rw-r--r--arch/x86/kernel/mpparse_64.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/arch/x86/kernel/mpparse_64.c b/arch/x86/kernel/mpparse_64.c
index 8c7af5b7ddd..9a961008991 100644
--- a/arch/x86/kernel/mpparse_64.c
+++ b/arch/x86/kernel/mpparse_64.c
@@ -593,7 +593,30 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,
smp_found_config = 1;
mpf_found = mpf;
+#ifdef CONFIG_X86_32
+ printk(KERN_INFO "found SMP MP-table at [%p] %08lx\n",
+ mpf, virt_to_phys(mpf));
+ reserve_bootmem(virt_to_phys(mpf), PAGE_SIZE,
+ BOOTMEM_DEFAULT);
+ if (mpf->mpf_physptr) {
+ /*
+ * We cannot access to MPC table to compute
+ * table size yet, as only few megabytes from
+ * the bottom is mapped now.
+ * PC-9800's MPC table places on the very last
+ * of physical memory; so that simply reserving
+ * PAGE_SIZE from mpg->mpf_physptr yields BUG()
+ * in reserve_bootmem.
+ */
+ unsigned long size = PAGE_SIZE;
+ unsigned long end = max_low_pfn * PAGE_SIZE;
+ if (mpf->mpf_physptr + size > end)
+ size = end - mpf->mpf_physptr;
+ reserve_bootmem(mpf->mpf_physptr, size,
+ BOOTMEM_DEFAULT);
+ }
+#else
if (!reserve)
return 1;
@@ -601,7 +624,8 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,
if (mpf->mpf_physptr)
reserve_bootmem_generic(mpf->mpf_physptr,
PAGE_SIZE);
- return 1;
+#endif
+ return 1;
}
bp += 4;
length -= 16;