aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-06-24 17:32:48 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 13:15:58 +0200
commit8207c2570af6f819b61be9ef3fb298d0a8c0e18c (patch)
tree0854b3e4a7e94deb6d9867393280965d1d22b517
parent9f9d489a3e78b49d897734eaaf9dea568dbea66e (diff)
x86: fix pte allocation in "x86: introduce init_memory_mapping for 32bit"
The patch "x86: introduce init_memory_mapping for 32bit" does not allocate enough space for PTEs if the CPU does not implement PSE. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Acked-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/mm/init_32.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index c059c460e32..156000de6e6 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -733,6 +733,11 @@ static void __init find_early_table_space(unsigned long end)
pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT;
tables += PAGE_ALIGN(pmds * sizeof(pmd_t));
+ if (!cpu_has_pse) {
+ int ptes = (end + PAGE_SIZE - 1) >> PAGE_SHIFT;
+ tables += PAGE_ALIGN(ptes * sizeof(pte_t));
+ }
+
/*
* RED-PEN putting page tables only on node 0 could
* cause a hotspot and fill up ZONE_DMA. The page tables