diff options
Diffstat (limited to 'include/asm-x86/pgtable.h')
-rw-r--r-- | include/asm-x86/pgtable.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index bbf0f591d1b8..ed932453ef26 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_PGTABLE_H | 1 | #ifndef ASM_X86__PGTABLE_H |
2 | #define _ASM_X86_PGTABLE_H | 2 | #define ASM_X86__PGTABLE_H |
3 | 3 | ||
4 | #define FIRST_USER_ADDRESS 0 | 4 | #define FIRST_USER_ADDRESS 0 |
5 | 5 | ||
@@ -199,6 +199,13 @@ static inline int pte_special(pte_t pte) | |||
199 | return pte_val(pte) & _PAGE_SPECIAL; | 199 | return pte_val(pte) & _PAGE_SPECIAL; |
200 | } | 200 | } |
201 | 201 | ||
202 | static inline unsigned long pte_pfn(pte_t pte) | ||
203 | { | ||
204 | return (pte_val(pte) & PTE_PFN_MASK) >> PAGE_SHIFT; | ||
205 | } | ||
206 | |||
207 | #define pte_page(pte) pfn_to_page(pte_pfn(pte)) | ||
208 | |||
202 | static inline int pmd_large(pmd_t pte) | 209 | static inline int pmd_large(pmd_t pte) |
203 | { | 210 | { |
204 | return (pmd_val(pte) & (_PAGE_PSE | _PAGE_PRESENT)) == | 211 | return (pmd_val(pte) & (_PAGE_PSE | _PAGE_PRESENT)) == |
@@ -326,6 +333,8 @@ static inline void native_pagetable_setup_start(pgd_t *base) {} | |||
326 | static inline void native_pagetable_setup_done(pgd_t *base) {} | 333 | static inline void native_pagetable_setup_done(pgd_t *base) {} |
327 | #endif | 334 | #endif |
328 | 335 | ||
336 | extern int arch_report_meminfo(char *page); | ||
337 | |||
329 | #ifdef CONFIG_PARAVIRT | 338 | #ifdef CONFIG_PARAVIRT |
330 | #include <asm/paravirt.h> | 339 | #include <asm/paravirt.h> |
331 | #else /* !CONFIG_PARAVIRT */ | 340 | #else /* !CONFIG_PARAVIRT */ |
@@ -534,4 +543,4 @@ static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count) | |||
534 | #include <asm-generic/pgtable.h> | 543 | #include <asm-generic/pgtable.h> |
535 | #endif /* __ASSEMBLY__ */ | 544 | #endif /* __ASSEMBLY__ */ |
536 | 545 | ||
537 | #endif /* _ASM_X86_PGTABLE_H */ | 546 | #endif /* ASM_X86__PGTABLE_H */ |