Skip to content

Commit

Permalink
x86: use PTE_MASK rather than ad-hoc mask
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeremy Fitzhardinge authored and Linus Torvalds committed May 20, 2008
1 parent 86aaf4f commit ba23cef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-x86/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
return __pgprot(preservebits | addbits);
}

#define pte_pgprot(x) __pgprot(pte_val(x) & (0xfff | _PAGE_NX))
#define pte_pgprot(x) __pgprot(pte_val(x) & ~PTE_MASK)

#define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask)

Expand Down

0 comments on commit ba23cef

Please sign in to comment.