aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-05-20 03:26:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-20 10:51:21 -0400
commitba23cef5c23cf1e9298032037d919157553d1211 (patch)
tree60fe1e5a9500165d5fcab710435a4bf3b22666cc /include/asm-x86
parent86aaf4fd4ea25ddde05772d03b93dbce23c0ead1 (diff)
x86: use PTE_MASK rather than ad-hoc mask
Use ~PTE_MASK to extract the non-pfn parts of the pte (ie, the pte flags), rather than constructing an ad-hoc mask. 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>
Diffstat (limited to 'include/asm-x86')
-rw-r--r--include/asm-x86/pgtable.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h
index b816134f753a..97c271b2910b 100644
--- a/include/asm-x86/pgtable.h
+++ b/include/asm-x86/pgtable.h
@@ -305,7 +305,7 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
305 return __pgprot(preservebits | addbits); 305 return __pgprot(preservebits | addbits);
306} 306}
307 307
308#define pte_pgprot(x) __pgprot(pte_val(x) & (0xfff | _PAGE_NX)) 308#define pte_pgprot(x) __pgprot(pte_val(x) & ~PTE_MASK)
309 309
310#define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask) 310#define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask)
311 311