Skip to content

Commit

Permalink
[SPARC64]: Fix bugs in SMP TLB context version expiration handling.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller authored and David S. Miller committed Mar 20, 2006
1 parent 6889331 commit aac0aad
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions arch/sparc64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit aac0aad

Please sign in to comment.