aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/mm/tlb.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2005-10-28 18:27:36 -0400
committerTony Luck <tony.luck@intel.com>2005-10-28 18:27:36 -0400
commit8496f2a4513edbc0c1d40496f1b0868dfed36eb0 (patch)
tree18a772d7a4c42ec325539b52d2053dabc99c460a /arch/ia64/mm/tlb.c
parent2d8f6a521908e3563478347aecad4ab20dc48155 (diff)
parentc1902aae322952f8726469a6657df7b9d5c794fe (diff)
Pull fix-slow-tlb-purge into release branch
Diffstat (limited to 'arch/ia64/mm/tlb.c')
-rw-r--r--arch/ia64/mm/tlb.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c
index 987fb754d6ad..c93e0f2b5fea 100644
--- a/arch/ia64/mm/tlb.c
+++ b/arch/ia64/mm/tlb.c
@@ -87,10 +87,15 @@ wrap_mmu_context (struct mm_struct *mm)
87} 87}
88 88
89void 89void
90ia64_global_tlb_purge (unsigned long start, unsigned long end, unsigned long nbits) 90ia64_global_tlb_purge (struct mm_struct *mm, unsigned long start, unsigned long end, unsigned long nbits)
91{ 91{
92 static DEFINE_SPINLOCK(ptcg_lock); 92 static DEFINE_SPINLOCK(ptcg_lock);
93 93
94 if (mm != current->active_mm) {
95 flush_tlb_all();
96 return;
97 }
98
94 /* HW requires global serialization of ptc.ga. */ 99 /* HW requires global serialization of ptc.ga. */
95 spin_lock(&ptcg_lock); 100 spin_lock(&ptcg_lock);
96 { 101 {
@@ -136,15 +141,12 @@ flush_tlb_range (struct vm_area_struct *vma, unsigned long start, unsigned long
136 unsigned long size = end - start; 141 unsigned long size = end - start;
137 unsigned long nbits; 142 unsigned long nbits;
138 143
144#ifndef CONFIG_SMP
139 if (mm != current->active_mm) { 145 if (mm != current->active_mm) {
140 /* this does happen, but perhaps it's not worth optimizing for? */
141#ifdef CONFIG_SMP
142 flush_tlb_all();
143#else
144 mm->context = 0; 146 mm->context = 0;
145#endif
146 return; 147 return;
147 } 148 }
149#endif
148 150
149 nbits = ia64_fls(size + 0xfff); 151 nbits = ia64_fls(size + 0xfff);
150 while (unlikely (((1UL << nbits) & purge.mask) == 0) && (nbits < purge.max_bits)) 152 while (unlikely (((1UL << nbits) & purge.mask) == 0) && (nbits < purge.max_bits))
@@ -154,7 +156,7 @@ flush_tlb_range (struct vm_area_struct *vma, unsigned long start, unsigned long
154 start &= ~((1UL << nbits) - 1); 156 start &= ~((1UL << nbits) - 1);
155 157
156# ifdef CONFIG_SMP 158# ifdef CONFIG_SMP
157 platform_global_tlb_purge(start, end, nbits); 159 platform_global_tlb_purge(mm, start, end, nbits);
158# else 160# else
159 do { 161 do {
160 ia64_ptcl(start, (nbits<<2)); 162 ia64_ptcl(start, (nbits<<2));