diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-05-20 08:26:20 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-20 07:51:21 -0700 |
commit | a4d6886270a5c892d71cd6e09186196a150a50dc (patch) | |
tree | d82dcd9e96d0097cd34d99e4bff0a327088f757a | |
parent | c57c05d0032cd5a500c5eba18ede4867a6d2cd5f (diff) | |
download | linux-a4d6886270a5c892d71cd6e09186196a150a50dc.tar.gz linux-a4d6886270a5c892d71cd6e09186196a150a50dc.tar.bz2 linux-a4d6886270a5c892d71cd6e09186196a150a50dc.zip |
x86: use PTE_MASK in 32-bit PAE
Use PTE_MASK in 3-level pagetables (ie, 32-bit PAE).
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Tested-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/asm-x86/pgtable-3level.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-x86/pgtable-3level.h b/include/asm-x86/pgtable-3level.h index 8b4a9d44b7f4..c93dbb6c2624 100644 --- a/include/asm-x86/pgtable-3level.h +++ b/include/asm-x86/pgtable-3level.h @@ -120,9 +120,9 @@ static inline void pud_clear(pud_t *pudp) write_cr3(pgd); } -#define pud_page(pud) ((struct page *) __va(pud_val(pud) & PAGE_MASK)) +#define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_MASK)) -#define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PAGE_MASK)) +#define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_MASK)) /* Find an entry in the second-level page table.. */ @@ -160,7 +160,7 @@ static inline int pte_none(pte_t pte) static inline unsigned long pte_pfn(pte_t pte) { - return (pte_val(pte) & ~_PAGE_NX) >> PAGE_SHIFT; + return (pte_val(pte) & PTE_MASK) >> PAGE_SHIFT; } /* |