diff options
Diffstat (limited to 'include/asm-mips/pgalloc.h')
-rw-r--r-- | include/asm-mips/pgalloc.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/asm-mips/pgalloc.h b/include/asm-mips/pgalloc.h index c4efeced8396..1275831dda29 100644 --- a/include/asm-mips/pgalloc.h +++ b/include/asm-mips/pgalloc.h | |||
@@ -20,10 +20,11 @@ static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, | |||
20 | } | 20 | } |
21 | 21 | ||
22 | static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, | 22 | static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, |
23 | struct page *pte) | 23 | pgtable_t pte) |
24 | { | 24 | { |
25 | set_pmd(pmd, __pmd((unsigned long)page_address(pte))); | 25 | set_pmd(pmd, __pmd((unsigned long)page_address(pte))); |
26 | } | 26 | } |
27 | #define pmd_pgtable(pmd) pmd_page(pmd) | ||
27 | 28 | ||
28 | /* | 29 | /* |
29 | * Initialize a new pmd table with invalid pointers. | 30 | * Initialize a new pmd table with invalid pointers. |
@@ -79,9 +80,10 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, | |||
79 | struct page *pte; | 80 | struct page *pte; |
80 | 81 | ||
81 | pte = alloc_pages(GFP_KERNEL | __GFP_REPEAT, PTE_ORDER); | 82 | pte = alloc_pages(GFP_KERNEL | __GFP_REPEAT, PTE_ORDER); |
82 | if (pte) | 83 | if (pte) { |
83 | clear_highpage(pte); | 84 | clear_highpage(pte); |
84 | 85 | pgtable_page_ctor(pte); | |
86 | } | ||
85 | return pte; | 87 | return pte; |
86 | } | 88 | } |
87 | 89 | ||
@@ -90,12 +92,17 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) | |||
90 | free_pages((unsigned long)pte, PTE_ORDER); | 92 | free_pages((unsigned long)pte, PTE_ORDER); |
91 | } | 93 | } |
92 | 94 | ||
93 | static inline void pte_free(struct mm_struct *mm, struct page *pte) | 95 | static inline void pte_free(struct mm_struct *mm, pgtable_t pte) |
94 | { | 96 | { |
97 | pgtable_page_dtor(pte); | ||
95 | __free_pages(pte, PTE_ORDER); | 98 | __free_pages(pte, PTE_ORDER); |
96 | } | 99 | } |
97 | 100 | ||
98 | #define __pte_free_tlb(tlb, pte) tlb_remove_page((tlb), (pte)) | 101 | #define __pte_free_tlb(tlb,pte) \ |
102 | do { \ | ||
103 | pgtable_page_dtor(pte); \ | ||
104 | tlb_remove_page((tlb), pte); \ | ||
105 | } while (0) | ||
99 | 106 | ||
100 | #ifdef CONFIG_32BIT | 107 | #ifdef CONFIG_32BIT |
101 | 108 | ||