aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel
diff options
context:
space:
mode:
authorPeter Chubb <peterc@gelato.unsw.edu.au>2005-06-24 00:14:00 -0400
committerTony Luck <tony.luck@intel.com>2005-06-28 13:01:19 -0400
commita68db763af9b676590c3fe9ec3f17bf18015eb2f (patch)
tree9862af81932797f0e68f7053d253e6b6b581ea3d /arch/ia64/kernel
parent819c67e69c4e0062787e27dd989f5f9d00d4834e (diff)
[IA64] Fix another IA64 preemption problem
There's another problem shown up by Ingo's recent patch to make smp_processor_id() complain if it's called with preemption enabled. local_finish_flush_tlb_mm() calls activate_context() in a situation where it could be rescheduled to another processor. This patch disables preemption around the call. Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r--arch/ia64/kernel/smp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index b49d4ddaab93..0166a9847095 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -231,13 +231,16 @@ smp_flush_tlb_all (void)
231void 231void
232smp_flush_tlb_mm (struct mm_struct *mm) 232smp_flush_tlb_mm (struct mm_struct *mm)
233{ 233{
234 preempt_disable();
234 /* this happens for the common case of a single-threaded fork(): */ 235 /* this happens for the common case of a single-threaded fork(): */
235 if (likely(mm == current->active_mm && atomic_read(&mm->mm_users) == 1)) 236 if (likely(mm == current->active_mm && atomic_read(&mm->mm_users) == 1))
236 { 237 {
237 local_finish_flush_tlb_mm(mm); 238 local_finish_flush_tlb_mm(mm);
239 preempt_enable();
238 return; 240 return;
239 } 241 }
240 242
243 preempt_enable();
241 /* 244 /*
242 * We could optimize this further by using mm->cpu_vm_mask to track which CPUs 245 * We could optimize this further by using mm->cpu_vm_mask to track which CPUs
243 * have been running in the address space. It's not clear that this is worth the 246 * have been running in the address space. It's not clear that this is worth the