diff options
-rw-r--r-- | arch/x86/mm/pageattr-test.c | 4 | ||||
-rw-r--r-- | arch/x86/mm/pageattr_32.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c index 0dce0e248a42..6cc106b388a5 100644 --- a/arch/x86/mm/pageattr-test.c +++ b/arch/x86/mm/pageattr-test.c | |||
@@ -20,10 +20,10 @@ enum { | |||
20 | LOWEST_LEVEL = 4, | 20 | LOWEST_LEVEL = 4, |
21 | LPS = (1 << PMD_SHIFT), | 21 | LPS = (1 << PMD_SHIFT), |
22 | #elif defined(CONFIG_X86_PAE) | 22 | #elif defined(CONFIG_X86_PAE) |
23 | LOWEST_LEVEL = 3, | 23 | LOWEST_LEVEL = 4, |
24 | LPS = (1 << PMD_SHIFT), | 24 | LPS = (1 << PMD_SHIFT), |
25 | #else | 25 | #else |
26 | LOWEST_LEVEL = 3, /* lookup_address lies here */ | 26 | LOWEST_LEVEL = 4, /* lookup_address lies here */ |
27 | LPS = (1 << 22), | 27 | LPS = (1 << 22), |
28 | #endif | 28 | #endif |
29 | GPS = (1<<30) | 29 | GPS = (1<<30) |
diff --git a/arch/x86/mm/pageattr_32.c b/arch/x86/mm/pageattr_32.c index dd49b16b3a0e..1c7bd81a4194 100644 --- a/arch/x86/mm/pageattr_32.c +++ b/arch/x86/mm/pageattr_32.c | |||
@@ -29,10 +29,10 @@ pte_t *lookup_address(unsigned long address, int *level) | |||
29 | pmd = pmd_offset(pud, address); | 29 | pmd = pmd_offset(pud, address); |
30 | if (pmd_none(*pmd)) | 30 | if (pmd_none(*pmd)) |
31 | return NULL; | 31 | return NULL; |
32 | *level = 2; | 32 | *level = 3; |
33 | if (pmd_large(*pmd)) | 33 | if (pmd_large(*pmd)) |
34 | return (pte_t *)pmd; | 34 | return (pte_t *)pmd; |
35 | *level = 3; | 35 | *level = 4; |
36 | 36 | ||
37 | return pte_offset_kernel(pmd, address); | 37 | return pte_offset_kernel(pmd, address); |
38 | } | 38 | } |
@@ -136,7 +136,7 @@ repeat: | |||
136 | address < (unsigned long)&_etext && | 136 | address < (unsigned long)&_etext && |
137 | (pgprot_val(prot) & _PAGE_NX)); | 137 | (pgprot_val(prot) & _PAGE_NX)); |
138 | 138 | ||
139 | if (level == 3) { | 139 | if (level == 4) { |
140 | set_pte_atomic(kpte, mk_pte(page, canon_pgprot(prot))); | 140 | set_pte_atomic(kpte, mk_pte(page, canon_pgprot(prot))); |
141 | } else { | 141 | } else { |
142 | err = split_large_page(kpte, address); | 142 | err = split_large_page(kpte, address); |