]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/mm/init_64.c
x86: rename LARGE_PAGE_SIZE to PMD_PAGE_SIZE
[linux-2.6-omap-h63xx.git] / arch / x86 / mm / init_64.c
index 9a471be4f5f1e743767252c9be0deefa4e474b8e..b7a7992c28b65e6347b2180e3db7df642181bfbe 100644 (file)
@@ -354,17 +354,10 @@ static void __init find_early_table_space(unsigned long end)
         * need roughly 0.5KB per GB.
         */
        start = 0x8000;
-       table_start = find_e820_area(start, end, tables);
+       table_start = find_e820_area(start, end, tables, PAGE_SIZE);
        if (table_start == -1UL)
                panic("Cannot find space for the kernel page tables");
 
-       /*
-        * When you have a lot of RAM like 256GB, early_table will not fit
-        * into 0x8000 range, find_e820_area() will find area after kernel
-        * bss but the table_start is not page aligned, so need to round it
-        * up to avoid overlap with bss:
-        */
-       table_start = round_up(table_start, PAGE_SIZE);
        table_start >>= PAGE_SHIFT;
        table_end = table_start;
 
@@ -420,7 +413,9 @@ void __init_refok init_memory_mapping(unsigned long start, unsigned long end)
                mmu_cr4_features = read_cr4();
        __flush_tlb_all();
 
-       reserve_early(table_start << PAGE_SHIFT, table_end << PAGE_SHIFT, "PGTABLE");
+       if (!after_bootmem)
+               reserve_early(table_start << PAGE_SHIFT,
+                                table_end << PAGE_SHIFT, "PGTABLE");
 }
 
 #ifndef CONFIG_NUMA
@@ -449,10 +444,10 @@ void __init clear_kernel_mapping(unsigned long address, unsigned long size)
 {
        unsigned long end = address + size;
 
-       BUG_ON(address & ~LARGE_PAGE_MASK);
-       BUG_ON(size & ~LARGE_PAGE_MASK);
+       BUG_ON(address & ~PMD_PAGE_MASK);
+       BUG_ON(size & ~PMD_PAGE_MASK);
 
-       for (; address < end; address += LARGE_PAGE_SIZE) {
+       for (; address < end; address += PMD_PAGE_SIZE) {
                pgd_t *pgd = pgd_offset_k(address);
                pud_t *pud;
                pmd_t *pmd;