aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm')
-rw-r--r--include/asm-arm/page.h2
-rw-r--r--include/asm-arm/pgalloc.h9
2 files changed, 8 insertions, 3 deletions
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h
index 31ff12f4ffb7..c86f68ee6511 100644
--- a/include/asm-arm/page.h
+++ b/include/asm-arm/page.h
@@ -171,6 +171,8 @@ typedef unsigned long pgprot_t;
171 171
172#endif /* STRICT_MM_TYPECHECKS */ 172#endif /* STRICT_MM_TYPECHECKS */
173 173
174typedef struct page *pgtable_t;
175
174#endif /* CONFIG_MMU */ 176#endif /* CONFIG_MMU */
175 177
176#include <asm/memory.h> 178#include <asm/memory.h>
diff --git a/include/asm-arm/pgalloc.h b/include/asm-arm/pgalloc.h
index fb6c6e3222bd..163b0305dd76 100644
--- a/include/asm-arm/pgalloc.h
+++ b/include/asm-arm/pgalloc.h
@@ -66,7 +66,7 @@ pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr)
66 return pte; 66 return pte;
67} 67}
68 68
69static inline struct page * 69static inline pgtable_t
70pte_alloc_one(struct mm_struct *mm, unsigned long addr) 70pte_alloc_one(struct mm_struct *mm, unsigned long addr)
71{ 71{
72 struct page *pte; 72 struct page *pte;
@@ -75,6 +75,7 @@ pte_alloc_one(struct mm_struct *mm, unsigned long addr)
75 if (pte) { 75 if (pte) {
76 void *page = page_address(pte); 76 void *page = page_address(pte);
77 clean_dcache_area(page, sizeof(pte_t) * PTRS_PER_PTE); 77 clean_dcache_area(page, sizeof(pte_t) * PTRS_PER_PTE);
78 pgtable_page_ctor(pte);
78 } 79 }
79 80
80 return pte; 81 return pte;
@@ -91,8 +92,9 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
91 } 92 }
92} 93}
93 94
94static inline void pte_free(struct mm_struct *mm, struct page *pte) 95static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
95{ 96{
97 pgtable_page_dtor(pte);
96 __free_page(pte); 98 __free_page(pte);
97} 99}
98 100
@@ -123,10 +125,11 @@ pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *ptep)
123} 125}
124 126
125static inline void 127static inline void
126pmd_populate(struct mm_struct *mm, pmd_t *pmdp, struct page *ptep) 128pmd_populate(struct mm_struct *mm, pmd_t *pmdp, pgtable_t ptep)
127{ 129{
128 __pmd_populate(pmdp, page_to_pfn(ptep) << PAGE_SHIFT | _PAGE_USER_TABLE); 130 __pmd_populate(pmdp, page_to_pfn(ptep) << PAGE_SHIFT | _PAGE_USER_TABLE);
129} 131}
132#define pmd_pgtable(pmd) pmd_page(pmd)
130 133
131#endif /* CONFIG_MMU */ 134#endif /* CONFIG_MMU */
132 135