aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390/pgalloc.h
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-s390/pgalloc.h
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-s390/pgalloc.h')
-rw-r--r--include/asm-s390/pgalloc.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h
index 709dd1740956..6f6619ba8980 100644
--- a/include/asm-s390/pgalloc.h
+++ b/include/asm-s390/pgalloc.h
@@ -57,10 +57,10 @@ static inline unsigned long pgd_entry_type(struct mm_struct *mm)
57} 57}
58 58
59#define pud_alloc_one(mm,address) ({ BUG(); ((pud_t *)2); }) 59#define pud_alloc_one(mm,address) ({ BUG(); ((pud_t *)2); })
60#define pud_free(x) do { } while (0) 60#define pud_free(mm, x) do { } while (0)
61 61
62#define pmd_alloc_one(mm,address) ({ BUG(); ((pmd_t *)2); }) 62#define pmd_alloc_one(mm,address) ({ BUG(); ((pmd_t *)2); })
63#define pmd_free(x) do { } while (0) 63#define pmd_free(mm, x) do { } while (0)
64 64
65#define pgd_populate(mm, pgd, pud) BUG() 65#define pgd_populate(mm, pgd, pud) BUG()
66#define pgd_populate_kernel(mm, pgd, pud) BUG() 66#define pgd_populate_kernel(mm, pgd, pud) BUG()
@@ -76,7 +76,7 @@ static inline unsigned long pgd_entry_type(struct mm_struct *mm)
76} 76}
77 77
78#define pud_alloc_one(mm,address) ({ BUG(); ((pud_t *)2); }) 78#define pud_alloc_one(mm,address) ({ BUG(); ((pud_t *)2); })
79#define pud_free(x) do { } while (0) 79#define pud_free(mm, x) do { } while (0)
80 80
81static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr) 81static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr)
82{ 82{
@@ -85,7 +85,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr)
85 crst_table_init(crst, _SEGMENT_ENTRY_EMPTY); 85 crst_table_init(crst, _SEGMENT_ENTRY_EMPTY);
86 return (pmd_t *) crst; 86 return (pmd_t *) crst;
87} 87}
88#define pmd_free(pmd) crst_table_free((unsigned long *) pmd) 88#define pmd_free(mm, pmd) crst_table_free((unsigned long *)pmd)
89 89
90#define pgd_populate(mm, pgd, pud) BUG() 90#define pgd_populate(mm, pgd, pud) BUG()
91#define pgd_populate_kernel(mm, pgd, pud) BUG() 91#define pgd_populate_kernel(mm, pgd, pud) BUG()
@@ -115,7 +115,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
115 crst_table_init(crst, pgd_entry_type(mm)); 115 crst_table_init(crst, pgd_entry_type(mm));
116 return (pgd_t *) crst; 116 return (pgd_t *) crst;
117} 117}
118#define pgd_free(pgd) crst_table_free((unsigned long *) pgd) 118#define pgd_free(mm, pgd) crst_table_free((unsigned long *) pgd)
119 119
120static inline void 120static inline void
121pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) 121pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte)
@@ -151,9 +151,9 @@ pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *page)
151#define pte_alloc_one(mm, vmaddr) \ 151#define pte_alloc_one(mm, vmaddr) \
152 virt_to_page(page_table_alloc(s390_noexec)) 152 virt_to_page(page_table_alloc(s390_noexec))
153 153
154#define pte_free_kernel(pte) \ 154#define pte_free_kernel(mm, pte) \
155 page_table_free((unsigned long *) pte) 155 page_table_free((unsigned long *) pte)
156#define pte_free(pte) \ 156#define pte_free(mm, pte) \
157 page_table_free((unsigned long *) page_to_phys((struct page *) pte)) 157 page_table_free((unsigned long *) page_to_phys((struct page *) pte))
158 158
159#endif /* _S390_PGALLOC_H */ 159#endif /* _S390_PGALLOC_H */