aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-01-30 07:33:59 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:33:59 -0500
commitbbb09f5cfcde7e4cf1466111d671ac4a62931148 (patch)
tree07b98129a9992559ee4c691b10695411e5747913
parent55ce29ba16f82a31424a98988cf37c3babe1b7c8 (diff)
x86: prepare for the unification of the cpa code
prepare for the unification of the cpa code, by unifying the lookup_address() logic between 32-bit and 64-bit. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--arch/x86/mm/pageattr-test.c4
-rw-r--r--arch/x86/mm/pageattr_32.c6
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);