aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/pgtable_64.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/pgtable_64.h')
-rw-r--r--include/asm-x86/pgtable_64.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h
index 6e615a103c2f..bd4740a60f29 100644
--- a/include/asm-x86/pgtable_64.h
+++ b/include/asm-x86/pgtable_64.h
@@ -21,7 +21,6 @@ extern pgd_t init_level4_pgt[];
21#define swapper_pg_dir init_level4_pgt 21#define swapper_pg_dir init_level4_pgt
22 22
23extern void paging_init(void); 23extern void paging_init(void);
24extern void clear_kernel_mapping(unsigned long addr, unsigned long size);
25 24
26#endif /* !__ASSEMBLY__ */ 25#endif /* !__ASSEMBLY__ */
27 26
@@ -199,6 +198,12 @@ static inline unsigned long pmd_bad(pmd_t pmd)
199#define pud_offset(pgd, address) ((pud_t *) pgd_page_vaddr(*(pgd)) + pud_index(address)) 198#define pud_offset(pgd, address) ((pud_t *) pgd_page_vaddr(*(pgd)) + pud_index(address))
200#define pud_present(pud) (pud_val(pud) & _PAGE_PRESENT) 199#define pud_present(pud) (pud_val(pud) & _PAGE_PRESENT)
201 200
201static inline int pud_large(pud_t pte)
202{
203 return (pud_val(pte) & (_PAGE_PSE|_PAGE_PRESENT)) ==
204 (_PAGE_PSE|_PAGE_PRESENT);
205}
206
202/* PMD - Level 2 access */ 207/* PMD - Level 2 access */
203#define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val(pmd) & PTE_MASK)) 208#define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val(pmd) & PTE_MASK))
204#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) 209#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))