aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-m32r/pgalloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-m32r/pgalloc.h')
-rw-r--r--include/asm-m32r/pgalloc.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/asm-m32r/pgalloc.h b/include/asm-m32r/pgalloc.h
index e5921adfad1b..f11a2b909cdb 100644
--- a/include/asm-m32r/pgalloc.h
+++ b/include/asm-m32r/pgalloc.h
@@ -9,10 +9,11 @@
9 set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte))) 9 set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte)))
10 10
11static __inline__ void pmd_populate(struct mm_struct *mm, pmd_t *pmd, 11static __inline__ void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
12 struct page *pte) 12 pgtable_t pte)
13{ 13{
14 set_pmd(pmd, __pmd(_PAGE_TABLE + page_to_phys(pte))); 14 set_pmd(pmd, __pmd(_PAGE_TABLE + page_to_phys(pte)));
15} 15}
16#define pmd_pgtable(pmd) pmd_page(pmd)
16 17
17/* 18/*
18 * Allocate and free page tables. 19 * Allocate and free page tables.
@@ -37,12 +38,12 @@ static __inline__ pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
37 return pte; 38 return pte;
38} 39}
39 40
40static __inline__ struct page *pte_alloc_one(struct mm_struct *mm, 41static __inline__ pgtable_t pte_alloc_one(struct mm_struct *mm,
41 unsigned long address) 42 unsigned long address)
42{ 43{
43 struct page *pte = alloc_page(GFP_KERNEL|__GFP_ZERO); 44 struct page *pte = alloc_page(GFP_KERNEL|__GFP_ZERO);
44 45
45 46 pgtable_page_ctor(pte);
46 return pte; 47 return pte;
47} 48}
48 49
@@ -51,8 +52,9 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
51 free_page((unsigned long)pte); 52 free_page((unsigned long)pte);
52} 53}
53 54
54static inline void pte_free(struct mm_struct *mm, struct page *pte) 55static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
55{ 56{
57 pgtable_page_dtor(pte);
56 __free_page(pte); 58 __free_page(pte);
57} 59}
58 60