]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: fix pte allocation in "x86: introduce init_memory_mapping for 32bit"
authorJeremy Fitzhardinge <jeremy@goop.org>
Tue, 24 Jun 2008 21:32:48 +0000 (17:32 -0400)
committerIngo Molnar <mingo@elte.hu>
Tue, 8 Jul 2008 11:15:58 +0000 (13:15 +0200)
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>
arch/x86/mm/init_32.c

index c059c460e32d76386150596daead5687346cba88..156000de6e627e2308d42138ef316f06c355a5e2 100644 (file)
@@ -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