Commit a4d68862 authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge Committed by Linus Torvalds

x86: use PTE_MASK in 32-bit PAE

Use PTE_MASK in 3-level pagetables (ie, 32-bit PAE).
Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Tested-by: default avatarHugh Dickins <hugh@veritas.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c57c05d0
...@@ -120,9 +120,9 @@ static inline void pud_clear(pud_t *pudp) ...@@ -120,9 +120,9 @@ static inline void pud_clear(pud_t *pudp)
write_cr3(pgd); 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.. */ /* Find an entry in the second-level page table.. */
...@@ -160,7 +160,7 @@ static inline int pte_none(pte_t pte) ...@@ -160,7 +160,7 @@ static inline int pte_none(pte_t pte)
static inline unsigned long pte_pfn(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;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment