diff options
Diffstat (limited to 'arch/x86/mm/init_32.c')
-rw-r--r-- | arch/x86/mm/init_32.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index ec30d10154b6..d71be0eb0130 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -162,6 +162,7 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base) | |||
162 | pgd_t *pgd; | 162 | pgd_t *pgd; |
163 | pmd_t *pmd; | 163 | pmd_t *pmd; |
164 | pte_t *pte; | 164 | pte_t *pte; |
165 | unsigned pages_2m = 0, pages_4k = 0; | ||
165 | 166 | ||
166 | pgd_idx = pgd_index(PAGE_OFFSET); | 167 | pgd_idx = pgd_index(PAGE_OFFSET); |
167 | pgd = pgd_base + pgd_idx; | 168 | pgd = pgd_base + pgd_idx; |
@@ -197,6 +198,7 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base) | |||
197 | is_kernel_text(addr2)) | 198 | is_kernel_text(addr2)) |
198 | prot = PAGE_KERNEL_LARGE_EXEC; | 199 | prot = PAGE_KERNEL_LARGE_EXEC; |
199 | 200 | ||
201 | pages_2m++; | ||
200 | set_pmd(pmd, pfn_pmd(pfn, prot)); | 202 | set_pmd(pmd, pfn_pmd(pfn, prot)); |
201 | 203 | ||
202 | pfn += PTRS_PER_PTE; | 204 | pfn += PTRS_PER_PTE; |
@@ -213,11 +215,14 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base) | |||
213 | if (is_kernel_text(addr)) | 215 | if (is_kernel_text(addr)) |
214 | prot = PAGE_KERNEL_EXEC; | 216 | prot = PAGE_KERNEL_EXEC; |
215 | 217 | ||
218 | pages_4k++; | ||
216 | set_pte(pte, pfn_pte(pfn, prot)); | 219 | set_pte(pte, pfn_pte(pfn, prot)); |
217 | } | 220 | } |
218 | max_pfn_mapped = pfn; | 221 | max_pfn_mapped = pfn; |
219 | } | 222 | } |
220 | } | 223 | } |
224 | update_page_count(PG_LEVEL_2M, pages_2m); | ||
225 | update_page_count(PG_LEVEL_4K, pages_4k); | ||
221 | } | 226 | } |
222 | 227 | ||
223 | static inline int page_kills_ppro(unsigned long pagenr) | 228 | static inline int page_kills_ppro(unsigned long pagenr) |
@@ -571,17 +576,6 @@ void __init mem_init(void) | |||
571 | #endif | 576 | #endif |
572 | bad_ppro = ppro_with_ram_bug(); | 577 | bad_ppro = ppro_with_ram_bug(); |
573 | 578 | ||
574 | #ifdef CONFIG_HIGHMEM | ||
575 | /* check that fixmap and pkmap do not overlap */ | ||
576 | if (PKMAP_BASE + LAST_PKMAP*PAGE_SIZE >= FIXADDR_START) { | ||
577 | printk(KERN_ERR | ||
578 | "fixmap and kmap areas overlap - this will crash\n"); | ||
579 | printk(KERN_ERR "pkstart: %lxh pkend: %lxh fixstart %lxh\n", | ||
580 | PKMAP_BASE, PKMAP_BASE + LAST_PKMAP*PAGE_SIZE, | ||
581 | FIXADDR_START); | ||
582 | BUG(); | ||
583 | } | ||
584 | #endif | ||
585 | /* this will put all low memory onto the freelists */ | 579 | /* this will put all low memory onto the freelists */ |
586 | totalram_pages += free_all_bootmem(); | 580 | totalram_pages += free_all_bootmem(); |
587 | 581 | ||
@@ -614,7 +608,6 @@ void __init mem_init(void) | |||
614 | (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10)) | 608 | (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10)) |
615 | ); | 609 | ); |
616 | 610 | ||
617 | #if 1 /* double-sanity-check paranoia */ | ||
618 | printk(KERN_INFO "virtual kernel memory layout:\n" | 611 | printk(KERN_INFO "virtual kernel memory layout:\n" |
619 | " fixmap : 0x%08lx - 0x%08lx (%4ld kB)\n" | 612 | " fixmap : 0x%08lx - 0x%08lx (%4ld kB)\n" |
620 | #ifdef CONFIG_HIGHMEM | 613 | #ifdef CONFIG_HIGHMEM |
@@ -655,7 +648,6 @@ void __init mem_init(void) | |||
655 | #endif | 648 | #endif |
656 | BUG_ON(VMALLOC_START > VMALLOC_END); | 649 | BUG_ON(VMALLOC_START > VMALLOC_END); |
657 | BUG_ON((unsigned long)high_memory > VMALLOC_START); | 650 | BUG_ON((unsigned long)high_memory > VMALLOC_START); |
658 | #endif /* double-sanity-check paranoia */ | ||
659 | 651 | ||
660 | if (boot_cpu_data.wp_works_ok < 0) | 652 | if (boot_cpu_data.wp_works_ok < 0) |
661 | test_wp_bit(); | 653 | test_wp_bit(); |