diff options
-rw-r--r-- | include/asm-x86/pgtable_32.h | 2 | ||||
-rw-r--r-- | include/asm-x86/pgtable_64.h | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index 21e70fbf1dae..935630d17304 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -148,6 +148,8 @@ static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count) | |||
148 | */ | 148 | */ |
149 | #define pgd_offset_k(address) pgd_offset(&init_mm, address) | 149 | #define pgd_offset_k(address) pgd_offset(&init_mm, address) |
150 | 150 | ||
151 | static inline int pud_large(pud_t pud) { return 0; } | ||
152 | |||
151 | /* | 153 | /* |
152 | * the pmd page can be thought of an array like this: pmd_t[PTRS_PER_PMD] | 154 | * the pmd page can be thought of an array like this: pmd_t[PTRS_PER_PMD] |
153 | * | 155 | * |
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h index 5c86cff3ee79..bd4740a60f29 100644 --- a/include/asm-x86/pgtable_64.h +++ b/include/asm-x86/pgtable_64.h | |||
@@ -198,6 +198,12 @@ static inline unsigned long pmd_bad(pmd_t pmd) | |||
198 | #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)) |
199 | #define pud_present(pud) (pud_val(pud) & _PAGE_PRESENT) | 199 | #define pud_present(pud) (pud_val(pud) & _PAGE_PRESENT) |
200 | 200 | ||
201 | static inline int pud_large(pud_t pte) | ||
202 | { | ||
203 | return (pud_val(pte) & (_PAGE_PSE|_PAGE_PRESENT)) == | ||
204 | (_PAGE_PSE|_PAGE_PRESENT); | ||
205 | } | ||
206 | |||
201 | /* PMD - Level 2 access */ | 207 | /* PMD - Level 2 access */ |
202 | #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)) |
203 | #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)) |