aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390
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
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')
-rw-r--r--include/asm-s390/pgalloc.h14
-rw-r--r--include/asm-s390/tlb.h8
2 files changed, 11 insertions, 11 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 */
diff --git a/include/asm-s390/tlb.h b/include/asm-s390/tlb.h
index 618693cfc10f..985de2b88279 100644
--- a/include/asm-s390/tlb.h
+++ b/include/asm-s390/tlb.h
@@ -65,9 +65,9 @@ static inline void tlb_flush_mmu(struct mmu_gather *tlb,
65 if (!tlb->fullmm && (tlb->nr_ptes > 0 || tlb->nr_pmds < TLB_NR_PTRS)) 65 if (!tlb->fullmm && (tlb->nr_ptes > 0 || tlb->nr_pmds < TLB_NR_PTRS))
66 __tlb_flush_mm(tlb->mm); 66 __tlb_flush_mm(tlb->mm);
67 while (tlb->nr_ptes > 0) 67 while (tlb->nr_ptes > 0)
68 pte_free(tlb->array[--tlb->nr_ptes]); 68 pte_free(tlb->mm, tlb->array[--tlb->nr_ptes]);
69 while (tlb->nr_pmds < TLB_NR_PTRS) 69 while (tlb->nr_pmds < TLB_NR_PTRS)
70 pmd_free((pmd_t *) tlb->array[tlb->nr_pmds++]); 70 pmd_free(tlb->mm, (pmd_t *) tlb->array[tlb->nr_pmds++]);
71} 71}
72 72
73static inline void tlb_finish_mmu(struct mmu_gather *tlb, 73static inline void tlb_finish_mmu(struct mmu_gather *tlb,
@@ -102,7 +102,7 @@ static inline void pte_free_tlb(struct mmu_gather *tlb, struct page *page)
102 if (tlb->nr_ptes >= tlb->nr_pmds) 102 if (tlb->nr_ptes >= tlb->nr_pmds)
103 tlb_flush_mmu(tlb, 0, 0); 103 tlb_flush_mmu(tlb, 0, 0);
104 } else 104 } else
105 pte_free(page); 105 pte_free(tlb->mm, page);
106} 106}
107 107
108/* 108/*
@@ -117,7 +117,7 @@ static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd)
117 if (tlb->nr_ptes >= tlb->nr_pmds) 117 if (tlb->nr_ptes >= tlb->nr_pmds)
118 tlb_flush_mmu(tlb, 0, 0); 118 tlb_flush_mmu(tlb, 0, 0);
119 } else 119 } else
120 pmd_free(pmd); 120 pmd_free(tlb->mm, pmd);
121#endif 121#endif
122} 122}
123 123