diff options
Diffstat (limited to 'include/asm-x86/pgtable.h')
-rw-r--r-- | include/asm-x86/pgtable.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index 4c03ff2246fd..b29a122fc1ff 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -141,6 +141,20 @@ static inline pte_t pte_mkwrite(pte_t pte) { return __pte(pte_val(pte) | _PAGE_R | |||
141 | static inline pte_t pte_mkhuge(pte_t pte) { return __pte(pte_val(pte) | _PAGE_PSE); } | 141 | static inline pte_t pte_mkhuge(pte_t pte) { return __pte(pte_val(pte) | _PAGE_PSE); } |
142 | static inline pte_t pte_clrhuge(pte_t pte) { return __pte(pte_val(pte) & ~_PAGE_PSE); } | 142 | static inline pte_t pte_clrhuge(pte_t pte) { return __pte(pte_val(pte) & ~_PAGE_PSE); } |
143 | 143 | ||
144 | extern pteval_t __supported_pte_mask; | ||
145 | |||
146 | static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot) | ||
147 | { | ||
148 | return __pte((((phys_addr_t)page_nr << PAGE_SHIFT) | | ||
149 | pgprot_val(pgprot)) & __supported_pte_mask); | ||
150 | } | ||
151 | |||
152 | static inline pmd_t pfn_pmd(unsigned long page_nr, pgprot_t pgprot) | ||
153 | { | ||
154 | return __pmd((((phys_addr_t)page_nr << PAGE_SHIFT) | | ||
155 | pgprot_val(pgprot)) & __supported_pte_mask); | ||
156 | } | ||
157 | |||
144 | #endif /* __ASSEMBLY__ */ | 158 | #endif /* __ASSEMBLY__ */ |
145 | 159 | ||
146 | #ifdef CONFIG_X86_32 | 160 | #ifdef CONFIG_X86_32 |