aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/pgalloc_32.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/pgalloc_32.h')
-rw-r--r--include/asm-x86/pgalloc_32.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-x86/pgalloc_32.h b/include/asm-x86/pgalloc_32.h
index bab12718a913..6bea6e5b5ee5 100644
--- a/include/asm-x86/pgalloc_32.h
+++ b/include/asm-x86/pgalloc_32.h
@@ -31,6 +31,7 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *p
31 paravirt_alloc_pt(mm, pfn); 31 paravirt_alloc_pt(mm, pfn);
32 set_pmd(pmd, __pmd(((pteval_t)pfn << PAGE_SHIFT) | _PAGE_TABLE)); 32 set_pmd(pmd, __pmd(((pteval_t)pfn << PAGE_SHIFT) | _PAGE_TABLE));
33} 33}
34#define pmd_pgtable(pmd) pmd_page(pmd)
34 35
35/* 36/*
36 * Allocate and free page tables. 37 * Allocate and free page tables.
@@ -39,15 +40,16 @@ extern pgd_t *pgd_alloc(struct mm_struct *);
39extern void pgd_free(struct mm_struct *mm, pgd_t *pgd); 40extern void pgd_free(struct mm_struct *mm, pgd_t *pgd);
40 41
41extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long); 42extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long);
42extern struct page *pte_alloc_one(struct mm_struct *, unsigned long); 43extern pgtable_t pte_alloc_one(struct mm_struct *, unsigned long);
43 44
44static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) 45static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
45{ 46{
46 free_page((unsigned long)pte); 47 free_page((unsigned long)pte);
47} 48}
48 49
49static inline void pte_free(struct mm_struct *mm, struct page *pte) 50static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
50{ 51{
52 pgtable_page_dtor(pte);
51 __free_page(pte); 53 __free_page(pte);
52} 54}
53 55