From baa0ada77e57f177f74f5f90b3305a69628f7868 Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Sat, 25 Oct 2008 22:58:21 -0700 Subject: [PATCH] --- yaml --- r: 117953 b: refs/heads/master c: 3afa39493de510c33c56ddc76e6e1af7f87c5392 h: refs/heads/master i: 117951: 3a62ebb72da917abc1039cbecdbab40df1171260 v: v3 --- [refs] | 2 +- trunk/arch/x86/mm/init_64.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index a900e765e501..378fac612724 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ef020ab0109aa5cd6eac2e93519b7641c9862828 +refs/heads/master: 3afa39493de510c33c56ddc76e6e1af7f87c5392 diff --git a/trunk/arch/x86/mm/init_64.c b/trunk/arch/x86/mm/init_64.c index b8e461d49412..c7a4c5a9a21b 100644 --- a/trunk/arch/x86/mm/init_64.c +++ b/trunk/arch/x86/mm/init_64.c @@ -350,8 +350,10 @@ phys_pte_init(pte_t *pte_page, unsigned long addr, unsigned long end, * pagetable pages as RO. So assume someone who pre-setup * these mappings are more intelligent. */ - if (pte_val(*pte)) + if (pte_val(*pte)) { + pages++; continue; + } if (0) printk(" pte=%p addr=%lx pte=%016lx\n", @@ -418,8 +420,10 @@ phys_pmd_init(pmd_t *pmd_page, unsigned long address, unsigned long end, * not differ with respect to page frame and * attributes. */ - if (page_size_mask & (1 << PG_LEVEL_2M)) + if (page_size_mask & (1 << PG_LEVEL_2M)) { + pages++; continue; + } new_prot = pte_pgprot(pte_clrhuge(*(pte_t *)pmd)); } @@ -499,8 +503,10 @@ phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end, * not differ with respect to page frame and * attributes. */ - if (page_size_mask & (1 << PG_LEVEL_1G)) + if (page_size_mask & (1 << PG_LEVEL_1G)) { + pages++; continue; + } prot = pte_pgprot(pte_clrhuge(*(pte_t *)pud)); }