aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-07-22 01:44:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-07-27 15:10:38 -0400
commit9e1b32caa525cb236e80e9c671e179bcecccc657 (patch)
tree8a1f0abf5291b23047cfdf099d5cfc96cc9d9253 /arch/s390
parent4be3bd7849165e7efa6b0b35a23d6a3598d97465 (diff)
mm: Pass virtual address to [__]p{te,ud,md}_free_tlb()
mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() Upcoming paches to support the new 64-bit "BookE" powerpc architecture will need to have the virtual address corresponding to PTE page when freeing it, due to the way the HW table walker works. Basically, the TLB can be loaded with "large" pages that cover the whole virtual space (well, sort-of, half of it actually) represented by a PTE page, and which contain an "indirect" bit indicating that this TLB entry RPN points to an array of PTEs from which the TLB can then create direct entries. Thus, in order to invalidate those when PTE pages are deleted, we need the virtual address to pass to tlbilx or tlbivax instructions. The old trick of sticking it somewhere in the PTE page struct page sucks too much, the address is almost readily available in all call sites and almost everybody implemets these as macros, so we may as well add the argument everywhere. I added it to the pmd and pud variants for consistency. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: David Howells <dhowells@redhat.com> [MN10300 & FRV] Acked-by: Nick Piggin <npiggin@suse.de> Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> [s390] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/tlb.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/s390/include/asm/tlb.h b/arch/s390/include/asm/tlb.h
index 3d8a96d39d9d..81150b053689 100644
--- a/arch/s390/include/asm/tlb.h
+++ b/arch/s390/include/asm/tlb.h
@@ -96,7 +96,8 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
96 * pte_free_tlb frees a pte table and clears the CRSTE for the 96 * pte_free_tlb frees a pte table and clears the CRSTE for the
97 * page table from the tlb. 97 * page table from the tlb.
98 */ 98 */
99static inline void pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte) 99static inline void pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte,
100 unsigned long address)
100{ 101{
101 if (!tlb->fullmm) { 102 if (!tlb->fullmm) {
102 tlb->array[tlb->nr_ptes++] = pte; 103 tlb->array[tlb->nr_ptes++] = pte;
@@ -113,7 +114,8 @@ static inline void pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte)
113 * as the pgd. pmd_free_tlb checks the asce_limit against 2GB 114 * as the pgd. pmd_free_tlb checks the asce_limit against 2GB
114 * to avoid the double free of the pmd in this case. 115 * to avoid the double free of the pmd in this case.
115 */ 116 */
116static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) 117static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd,
118 unsigned long address)
117{ 119{
118#ifdef __s390x__ 120#ifdef __s390x__
119 if (tlb->mm->context.asce_limit <= (1UL << 31)) 121 if (tlb->mm->context.asce_limit <= (1UL << 31))
@@ -134,7 +136,8 @@ static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd)
134 * as the pgd. pud_free_tlb checks the asce_limit against 4TB 136 * as the pgd. pud_free_tlb checks the asce_limit against 4TB
135 * to avoid the double free of the pud in this case. 137 * to avoid the double free of the pud in this case.
136 */ 138 */
137static inline void pud_free_tlb(struct mmu_gather *tlb, pud_t *pud) 139static inline void pud_free_tlb(struct mmu_gather *tlb, pud_t *pud,
140 unsigned long address)
138{ 141{
139#ifdef __s390x__ 142#ifdef __s390x__
140 if (tlb->mm->context.asce_limit <= (1UL << 42)) 143 if (tlb->mm->context.asce_limit <= (1UL << 42))