arches: drop superfluous casts in nr_free_pages() callers
[deliverable/linux.git] / arch / x86 / mm / init_32.c
index 949708d7a481ec10e9591faba7466b3e1a75f57d..95e877f5b846ba02e2d6c5cebfb14e1f6822a70b 100644 (file)
@@ -111,7 +111,7 @@ static pte_t * __init one_page_table_init(pmd_t *pmd)
                pte_t *page_table = NULL;
 
                if (after_bootmem) {
-#ifdef CONFIG_DEBUG_PAGEALLOC
+#if defined(CONFIG_DEBUG_PAGEALLOC) || defined(CONFIG_KMEMCHECK)
                        page_table = (pte_t *) alloc_bootmem_pages(PAGE_SIZE);
 #endif
                        if (!page_table)
@@ -564,7 +564,7 @@ static inline void save_pg_dir(void)
 }
 #endif /* !CONFIG_ACPI_SLEEP */
 
-void zap_low_mappings(void)
+void zap_low_mappings(bool early)
 {
        int i;
 
@@ -581,7 +581,11 @@ void zap_low_mappings(void)
                set_pgd(swapper_pg_dir+i, __pgd(0));
 #endif
        }
-       flush_tlb_all();
+
+       if (early)
+               __flush_tlb();
+       else
+               flush_tlb_all();
 }
 
 pteval_t __supported_pte_mask __read_mostly = ~(_PAGE_NX | _PAGE_GLOBAL | _PAGE_IOMAP);
@@ -888,7 +892,7 @@ void __init mem_init(void)
 
        printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, "
                        "%dk reserved, %dk data, %dk init, %ldk highmem)\n",
-               (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
+               nr_free_pages() << (PAGE_SHIFT-10),
                num_physpages << (PAGE_SHIFT-10),
                codesize >> 10,
                reservedpages << (PAGE_SHIFT-10),
@@ -956,7 +960,7 @@ void __init mem_init(void)
                test_wp_bit();
 
        save_pg_dir();
-       zap_low_mappings();
+       zap_low_mappings(true);
 }
 
 #ifdef CONFIG_MEMORY_HOTPLUG
This page took 0.024392 seconds and 5 git commands to generate.