diff options
| -rw-r--r-- | arch/x86/mm/init_64.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index b8e461d49412..c7a4c5a9a21b 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
| @@ -350,8 +350,10 @@ phys_pte_init(pte_t *pte_page, unsigned long addr, unsigned long end, | |||
| 350 | * pagetable pages as RO. So assume someone who pre-setup | 350 | * pagetable pages as RO. So assume someone who pre-setup |
| 351 | * these mappings are more intelligent. | 351 | * these mappings are more intelligent. |
| 352 | */ | 352 | */ |
| 353 | if (pte_val(*pte)) | 353 | if (pte_val(*pte)) { |
| 354 | pages++; | ||
| 354 | continue; | 355 | continue; |
| 356 | } | ||
| 355 | 357 | ||
| 356 | if (0) | 358 | if (0) |
| 357 | printk(" pte=%p addr=%lx pte=%016lx\n", | 359 | 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, | |||
| 418 | * not differ with respect to page frame and | 420 | * not differ with respect to page frame and |
| 419 | * attributes. | 421 | * attributes. |
| 420 | */ | 422 | */ |
| 421 | if (page_size_mask & (1 << PG_LEVEL_2M)) | 423 | if (page_size_mask & (1 << PG_LEVEL_2M)) { |
| 424 | pages++; | ||
| 422 | continue; | 425 | continue; |
| 426 | } | ||
| 423 | new_prot = pte_pgprot(pte_clrhuge(*(pte_t *)pmd)); | 427 | new_prot = pte_pgprot(pte_clrhuge(*(pte_t *)pmd)); |
| 424 | } | 428 | } |
| 425 | 429 | ||
| @@ -499,8 +503,10 @@ phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end, | |||
| 499 | * not differ with respect to page frame and | 503 | * not differ with respect to page frame and |
| 500 | * attributes. | 504 | * attributes. |
| 501 | */ | 505 | */ |
| 502 | if (page_size_mask & (1 << PG_LEVEL_1G)) | 506 | if (page_size_mask & (1 << PG_LEVEL_1G)) { |
| 507 | pages++; | ||
| 503 | continue; | 508 | continue; |
| 509 | } | ||
| 504 | prot = pte_pgprot(pte_clrhuge(*(pte_t *)pud)); | 510 | prot = pte_pgprot(pte_clrhuge(*(pte_t *)pud)); |
| 505 | } | 511 | } |
| 506 | 512 | ||
