diff options
Diffstat (limited to 'include/asm-parisc')
-rw-r--r-- | include/asm-parisc/page.h | 1 | ||||
-rw-r--r-- | include/asm-parisc/pgalloc.h | 11 |
2 files changed, 10 insertions, 2 deletions
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h index b08d9151c71e..27d50b859541 100644 --- a/include/asm-parisc/page.h +++ b/include/asm-parisc/page.h | |||
@@ -91,6 +91,7 @@ typedef unsigned long pgprot_t; | |||
91 | 91 | ||
92 | #endif /* STRICT_MM_TYPECHECKS */ | 92 | #endif /* STRICT_MM_TYPECHECKS */ |
93 | 93 | ||
94 | typedef struct page *pgtable_t; | ||
94 | 95 | ||
95 | typedef struct __physmem_range { | 96 | typedef struct __physmem_range { |
96 | unsigned long start_pfn; | 97 | unsigned long start_pfn; |
diff --git a/include/asm-parisc/pgalloc.h b/include/asm-parisc/pgalloc.h index aab66f1bea14..3996dfc30a3f 100644 --- a/include/asm-parisc/pgalloc.h +++ b/include/asm-parisc/pgalloc.h | |||
@@ -115,11 +115,14 @@ pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) | |||
115 | 115 | ||
116 | #define pmd_populate(mm, pmd, pte_page) \ | 116 | #define pmd_populate(mm, pmd, pte_page) \ |
117 | pmd_populate_kernel(mm, pmd, page_address(pte_page)) | 117 | pmd_populate_kernel(mm, pmd, page_address(pte_page)) |
118 | #define pmd_pgtable(pmd) pmd_page(pmd) | ||
118 | 119 | ||
119 | static inline struct page * | 120 | static inline pgtable_t |
120 | pte_alloc_one(struct mm_struct *mm, unsigned long address) | 121 | pte_alloc_one(struct mm_struct *mm, unsigned long address) |
121 | { | 122 | { |
122 | struct page *page = alloc_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); | 123 | struct page *page = alloc_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); |
124 | if (page) | ||
125 | pgtable_page_ctor(page); | ||
123 | return page; | 126 | return page; |
124 | } | 127 | } |
125 | 128 | ||
@@ -135,7 +138,11 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) | |||
135 | free_page((unsigned long)pte); | 138 | free_page((unsigned long)pte); |
136 | } | 139 | } |
137 | 140 | ||
138 | #define pte_free(mm, page) pte_free_kernel(page_address(page)) | 141 | static inline void pte_free_kernel(struct mm_struct *mm, struct page *pte) |
142 | { | ||
143 | pgtable_page_dtor(pte); | ||
144 | pte_free_kernel(page_address((pte)); | ||
145 | } | ||
139 | 146 | ||
140 | #define check_pgt_cache() do { } while (0) | 147 | #define check_pgt_cache() do { } while (0) |
141 | 148 | ||