Commit aac0aadf authored by David S. Miller's avatar David S. Miller Committed by David S. Miller

[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: default avatarDavid S. Miller <davem@davemloft.net>
parent 6889331a
...@@ -909,15 +909,19 @@ void smp_receive_signal_client(int irq, struct pt_regs *regs) ...@@ -909,15 +909,19 @@ void smp_receive_signal_client(int irq, struct pt_regs *regs)
*/ */
mm = current->active_mm; mm = current->active_mm;
if (likely(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); get_new_mmu_context(mm);
load_secondary_context(mm); load_secondary_context(mm);
__flush_tlb_mm(CTX_HWBITS(mm->context),
SECONDARY_CONTEXT);
spin_unlock_irqrestore(&mm->context.lock, flags); spin_unlock_irqrestore(&mm->context.lock, flags);
} }
}
} }
void smp_new_mmu_context_version(void) void smp_new_mmu_context_version(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment