Merge branches 'x86/numa-fixes', 'x86/apic', 'x86/apm', 'x86/bitops', 'x86/build...
[linux-2.6-block.git] / arch / x86 / mm / init_32.c
index ec30d10154b657a63ab07b5e25b4298c10f4aabe..d71be0eb0130ec0bf6cc9838db5be69493826c5d 100644 (file)
@@ -162,6 +162,7 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
        pgd_t *pgd;
        pmd_t *pmd;
        pte_t *pte;
+       unsigned pages_2m = 0, pages_4k = 0;
 
        pgd_idx = pgd_index(PAGE_OFFSET);
        pgd = pgd_base + pgd_idx;
@@ -197,6 +198,7 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
                                    is_kernel_text(addr2))
                                        prot = PAGE_KERNEL_LARGE_EXEC;
 
+                               pages_2m++;
                                set_pmd(pmd, pfn_pmd(pfn, prot));
 
                                pfn += PTRS_PER_PTE;
@@ -213,11 +215,14 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
                                if (is_kernel_text(addr))
                                        prot = PAGE_KERNEL_EXEC;
 
+                               pages_4k++;
                                set_pte(pte, pfn_pte(pfn, prot));
                        }
                        max_pfn_mapped = pfn;
                }
        }
+       update_page_count(PG_LEVEL_2M, pages_2m);
+       update_page_count(PG_LEVEL_4K, pages_4k);
 }
 
 static inline int page_kills_ppro(unsigned long pagenr)
@@ -571,17 +576,6 @@ void __init mem_init(void)
 #endif
        bad_ppro = ppro_with_ram_bug();
 
-#ifdef CONFIG_HIGHMEM
-       /* check that fixmap and pkmap do not overlap */
-       if (PKMAP_BASE + LAST_PKMAP*PAGE_SIZE >= FIXADDR_START) {
-               printk(KERN_ERR
-                       "fixmap and kmap areas overlap - this will crash\n");
-               printk(KERN_ERR "pkstart: %lxh pkend: %lxh fixstart %lxh\n",
-                               PKMAP_BASE, PKMAP_BASE + LAST_PKMAP*PAGE_SIZE,
-                               FIXADDR_START);
-               BUG();
-       }
-#endif
        /* this will put all low memory onto the freelists */
        totalram_pages += free_all_bootmem();
 
@@ -614,7 +608,6 @@ void __init mem_init(void)
                (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10))
               );
 
-#if 1 /* double-sanity-check paranoia */
        printk(KERN_INFO "virtual kernel memory layout:\n"
                "    fixmap  : 0x%08lx - 0x%08lx   (%4ld kB)\n"
 #ifdef CONFIG_HIGHMEM
@@ -655,7 +648,6 @@ void __init mem_init(void)
 #endif
        BUG_ON(VMALLOC_START                            > VMALLOC_END);
        BUG_ON((unsigned long)high_memory               > VMALLOC_START);
-#endif /* double-sanity-check paranoia */
 
        if (boot_cpu_data.wp_works_ok < 0)
                test_wp_bit();