diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-01-30 13:33:59 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 13:33:59 +0100 |
commit | a5f55035f63cf040b4a7161226ec35520cc10daa (patch) | |
tree | 14e7d58562413814326ec2df4b4b9a46d794f439 /arch/x86 | |
parent | bbb09f5cfcde7e4cf1466111d671ac4a62931148 (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')
-rw-r--r-- | arch/x86/mm/pageattr_64.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/x86/mm/pageattr_64.c b/arch/x86/mm/pageattr_64.c index 73dbbb4048e..7b734ee5b7f 100644 --- a/arch/x86/mm/pageattr_64.c +++ b/arch/x86/mm/pageattr_64.c @@ -19,26 +19,21 @@ pte_t *lookup_address(unsigned long address, int *level) pgd_t *pgd = pgd_offset_k(address); pud_t *pud; pmd_t *pmd; - pte_t *pte; if (pgd_none(*pgd)) return NULL; pud = pud_offset(pgd, address); - if (!pud_present(*pud)) + if (pud_none(*pud)) return NULL; pmd = pmd_offset(pud, address); - if (!pmd_present(*pmd)) + if (pmd_none(*pmd)) return NULL; *level = 3; if (pmd_large(*pmd)) return (pte_t *)pmd; *level = 4; - pte = pte_offset_kernel(pmd, address); - if (pte && !pte_present(*pte)) - pte = NULL; - - return pte; + return pte_offset_kernel(pmd, address); } static struct page * |