aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/page.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/page.h')
-rw-r--r--include/asm-x86/page.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h
index e99fb9fe6f8a..6c846228948d 100644
--- a/include/asm-x86/page.h
+++ b/include/asm-x86/page.h
@@ -21,6 +21,9 @@
21/* PTE_PFN_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */ 21/* PTE_PFN_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */
22#define PTE_PFN_MASK ((pteval_t)PHYSICAL_PAGE_MASK) 22#define PTE_PFN_MASK ((pteval_t)PHYSICAL_PAGE_MASK)
23 23
24/* PTE_FLAGS_MASK extracts the flags from a (pte|pmd|pud|pgd)val_t */
25#define PTE_FLAGS_MASK (~PTE_PFN_MASK)
26
24#define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT) 27#define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT)
25#define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1)) 28#define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1))
26 29
@@ -146,7 +149,7 @@ static inline pteval_t native_pte_val(pte_t pte)
146 149
147static inline pteval_t native_pte_flags(pte_t pte) 150static inline pteval_t native_pte_flags(pte_t pte)
148{ 151{
149 return native_pte_val(pte) & ~PTE_PFN_MASK; 152 return native_pte_val(pte) & PTE_FLAGS_MASK;
150} 153}
151 154
152#define pgprot_val(x) ((x).pgprot) 155#define pgprot_val(x) ((x).pgprot)