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 04caa2f544df..888add7b0882 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 | ||
@@ -186,6 +186,13 @@ static inline int pte_special(pte_t pte) | |||
186 | return pte_val(pte) & _PAGE_SPECIAL; | 186 | return pte_val(pte) & _PAGE_SPECIAL; |
187 | } | 187 | } |
188 | 188 | ||
189 | static inline unsigned long pte_pfn(pte_t pte) | ||
190 | { | ||
191 | return (pte_val(pte) & PTE_PFN_MASK) >> PAGE_SHIFT; | ||
192 | } | ||
193 | |||
194 | #define pte_page(pte) pfn_to_page(pte_pfn(pte)) | ||
195 | |||
189 | static inline int pmd_large(pmd_t pte) | 196 | static inline int pmd_large(pmd_t pte) |
190 | { | 197 | { |
191 | return (pmd_val(pte) & (_PAGE_PSE | _PAGE_PRESENT)) == | 198 | return (pmd_val(pte) & (_PAGE_PSE | _PAGE_PRESENT)) == |
@@ -313,6 +320,8 @@ static inline void native_pagetable_setup_start(pgd_t *base) {} | |||
313 | static inline void native_pagetable_setup_done(pgd_t *base) {} | 320 | static inline void native_pagetable_setup_done(pgd_t *base) {} |
314 | #endif | 321 | #endif |
315 | 322 | ||
323 | extern int arch_report_meminfo(char *page); | ||
324 | |||
316 | #ifdef CONFIG_PARAVIRT | 325 | #ifdef CONFIG_PARAVIRT |
317 | #include <asm/paravirt.h> | 326 | #include <asm/paravirt.h> |
318 | #else /* !CONFIG_PARAVIRT */ | 327 | #else /* !CONFIG_PARAVIRT */ |
@@ -521,4 +530,4 @@ static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count) | |||
521 | #include <asm-generic/pgtable.h> | 530 | #include <asm-generic/pgtable.h> |
522 | #endif /* __ASSEMBLY__ */ | 531 | #endif /* __ASSEMBLY__ */ |
523 | 532 | ||
524 | #endif /* _ASM_X86_PGTABLE_H */ | 533 | #endif /* ASM_X86__PGTABLE_H */ |