]> err.no Git - linux-2.6/commitdiff
x86: use PTE_MASK in 32-bit PAE
authorJeremy Fitzhardinge <jeremy@goop.org>
Tue, 20 May 2008 07:26:20 +0000 (08:26 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 20 May 2008 14:51:21 +0000 (07:51 -0700)
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>
include/asm-x86/pgtable-3level.h

index 8b4a9d44b7f4cc24db4040e20fc8a318c172cee7..c93dbb6c26247dfa76d92b5a5dd8e73c7c41dd3c 100644 (file)
@@ -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;
 }
 
 /*