aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-02-05 01:29:14 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:18 -0500
commit5e5419734c8719cbc01af959ad9c0844002c0df5 (patch)
treea075dca3f719946689efa0245464855cbf2a20ce /include/asm-mips
parent9f8f2172537de7af0b0fbd33502d18d52b1339bc (diff)
add mm argument to pte/pmd/pud/pgd_free
(with Martin Schwidefsky <schwidefsky@de.ibm.com>) The pgd/pud/pmd/pte page table allocation functions get a mm_struct pointer as first argument. The free functions do not get the mm_struct argument. This is 1) asymmetrical and 2) to do mm related page table allocations the mm argument is needed on the free function as well. [kamalesh@linux.vnet.ibm.com: i386 fix] [akpm@linux-foundation.org: coding-syle fixes] Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-mips')
-rw-r--r--include/asm-mips/pgalloc.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/asm-mips/pgalloc.h b/include/asm-mips/pgalloc.h
index 81b72122207a..c4efeced8396 100644
--- a/include/asm-mips/pgalloc.h
+++ b/include/asm-mips/pgalloc.h
@@ -58,7 +58,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
58 return ret; 58 return ret;
59} 59}
60 60
61static inline void pgd_free(pgd_t *pgd) 61static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
62{ 62{
63 free_pages((unsigned long)pgd, PGD_ORDER); 63 free_pages((unsigned long)pgd, PGD_ORDER);
64} 64}
@@ -85,12 +85,12 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm,
85 return pte; 85 return pte;
86} 86}
87 87
88static inline void pte_free_kernel(pte_t *pte) 88static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
89{ 89{
90 free_pages((unsigned long)pte, PTE_ORDER); 90 free_pages((unsigned long)pte, PTE_ORDER);
91} 91}
92 92
93static inline void pte_free(struct page *pte) 93static inline void pte_free(struct mm_struct *mm, struct page *pte)
94{ 94{
95 __free_pages(pte, PTE_ORDER); 95 __free_pages(pte, PTE_ORDER);
96} 96}
@@ -103,7 +103,7 @@ static inline void pte_free(struct page *pte)
103 * allocating and freeing a pmd is trivial: the 1-entry pmd is 103 * allocating and freeing a pmd is trivial: the 1-entry pmd is
104 * inside the pgd, so has no extra memory associated with it. 104 * inside the pgd, so has no extra memory associated with it.
105 */ 105 */
106#define pmd_free(x) do { } while (0) 106#define pmd_free(mm, x) do { } while (0)
107#define __pmd_free_tlb(tlb, x) do { } while (0) 107#define __pmd_free_tlb(tlb, x) do { } while (0)
108 108
109#endif 109#endif
@@ -120,12 +120,12 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
120 return pmd; 120 return pmd;
121} 121}
122 122
123static inline void pmd_free(pmd_t *pmd) 123static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
124{ 124{
125 free_pages((unsigned long)pmd, PMD_ORDER); 125 free_pages((unsigned long)pmd, PMD_ORDER);
126} 126}
127 127
128#define __pmd_free_tlb(tlb, x) pmd_free(x) 128#define __pmd_free_tlb(tlb, x) pmd_free((tlb)->mm, x)
129 129
130#endif 130#endif
131 131