summaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pageattr_32.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-01-30 13:33:59 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:33:59 +0100
commitbbb09f5cfcde7e4cf1466111d671ac4a62931148 (patch)
tree07b98129a9992559ee4c691b10695411e5747913 /arch/x86/mm/pageattr_32.c
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>
Diffstat (limited to 'arch/x86/mm/pageattr_32.c')
-rw-r--r--arch/x86/mm/pageattr_32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/mm/pageattr_32.c b/arch/x86/mm/pageattr_32.c
index dd49b16b3a0..1c7bd81a419 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)
pmd = pmd_offset(pud, address);
if (pmd_none(*pmd))
return NULL;
- *level = 2;
+ *level = 3;
if (pmd_large(*pmd))
return (pte_t *)pmd;
- *level = 3;
+ *level = 4;
return pte_offset_kernel(pmd, address);
}
@@ -136,7 +136,7 @@ repeat:
address < (unsigned long)&_etext &&
(pgprot_val(prot) & _PAGE_NX));
- if (level == 3) {
+ if (level == 4) {
set_pte_atomic(kpte, mk_pte(page, canon_pgprot(prot)));
} else {
err = split_large_page(kpte, address);