aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-parisc
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-parisc
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-parisc')
-rw-r--r--include/asm-parisc/pgalloc.h10
-rw-r--r--include/asm-parisc/tlb.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/include/asm-parisc/pgalloc.h b/include/asm-parisc/pgalloc.h
index 1af1a41e0723..aab66f1bea14 100644
--- a/include/asm-parisc/pgalloc.h
+++ b/include/asm-parisc/pgalloc.h
@@ -43,7 +43,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
43 return actual_pgd; 43 return actual_pgd;
44} 44}
45 45
46static inline void pgd_free(pgd_t *pgd) 46static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
47{ 47{
48#ifdef CONFIG_64BIT 48#ifdef CONFIG_64BIT
49 pgd -= PTRS_PER_PGD; 49 pgd -= PTRS_PER_PGD;
@@ -70,7 +70,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
70 return pmd; 70 return pmd;
71} 71}
72 72
73static inline void pmd_free(pmd_t *pmd) 73static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
74{ 74{
75#ifdef CONFIG_64BIT 75#ifdef CONFIG_64BIT
76 if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED) 76 if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED)
@@ -91,7 +91,7 @@ static inline void pmd_free(pmd_t *pmd)
91 */ 91 */
92 92
93#define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *)2); }) 93#define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *)2); })
94#define pmd_free(x) do { } while (0) 94#define pmd_free(mm, x) do { } while (0)
95#define pgd_populate(mm, pmd, pte) BUG() 95#define pgd_populate(mm, pmd, pte) BUG()
96 96
97#endif 97#endif
@@ -130,12 +130,12 @@ pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr)
130 return pte; 130 return pte;
131} 131}
132 132
133static inline void pte_free_kernel(pte_t *pte) 133static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
134{ 134{
135 free_page((unsigned long)pte); 135 free_page((unsigned long)pte);
136} 136}
137 137
138#define pte_free(page) pte_free_kernel(page_address(page)) 138#define pte_free(mm, page) pte_free_kernel(page_address(page))
139 139
140#define check_pgt_cache() do { } while (0) 140#define check_pgt_cache() do { } while (0)
141 141
diff --git a/include/asm-parisc/tlb.h b/include/asm-parisc/tlb.h
index 33107a248e1f..383b1db310ee 100644
--- a/include/asm-parisc/tlb.h
+++ b/include/asm-parisc/tlb.h
@@ -21,7 +21,7 @@ do { if (!(tlb)->fullmm) \
21 21
22#include <asm-generic/tlb.h> 22#include <asm-generic/tlb.h>
23 23
24#define __pmd_free_tlb(tlb, pmd) pmd_free(pmd) 24#define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd)
25#define __pte_free_tlb(tlb, pte) pte_free(pte) 25#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, pte)
26 26
27#endif 27#endif