summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller2006-02-28 02:56:51 +0100
committerDavid S. Miller2006-03-20 10:14:08 +0100
commitaac0aadf09b98ba36eab0bb02a560ebcb82ac39f (patch)
tree0628f23fd3d7bd343966e038d6328f9bf0e8751d /arch
parent[SPARC64]: Fix indexing into kpte_linear_bitmap. (diff)
downloadkernel-qcow2-linux-aac0aadf09b98ba36eab0bb02a560ebcb82ac39f.tar.gz
kernel-qcow2-linux-aac0aadf09b98ba36eab0bb02a560ebcb82ac39f.tar.xz
kernel-qcow2-linux-aac0aadf09b98ba36eab0bb02a560ebcb82ac39f.zip
[SPARC64]: Fix bugs in SMP TLB context version expiration handling.
1) We must flush the TLB, duh. 2) Even if the sw context was seen to be valid, the local cpu's hw context can be out of date, so reload it unconditionally. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/kernel/smp.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 5ff2483e70bf..eb7c0f855ba7 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -909,14 +909,18 @@ void smp_receive_signal_client(int irq, struct pt_regs *regs)
*/
mm = current->active_mm;
if (likely(mm)) {
- if (unlikely(!CTX_VALID(mm->context))) {
- unsigned long flags;
+ unsigned long flags;
- spin_lock_irqsave(&mm->context.lock, flags);
+ spin_lock_irqsave(&mm->context.lock, flags);
+
+ if (unlikely(!CTX_VALID(mm->context)))
get_new_mmu_context(mm);
- load_secondary_context(mm);
- spin_unlock_irqrestore(&mm->context.lock, flags);
- }
+
+ load_secondary_context(mm);
+ __flush_tlb_mm(CTX_HWBITS(mm->context),
+ SECONDARY_CONTEXT);
+
+ spin_unlock_irqrestore(&mm->context.lock, flags);
}
}