• David S. Miller's avatar
    [SPARC64]: Make tsb_sync() mm comparison more precise. · 6f25f398
    David S. Miller authored
    switch_mm() changes the mm state and does a tsb_context_switch()
    first, then we do the cpu register state switch which changes
    current_thread_info() and current().
    
    So it's safer to check the PGD physical address stored in the
    trap block (which will be updated by the tsb_context_switch() in
    switch_mm()) than current->active_mm.
    
    Technically we should never run here in between those two
    updates, because interrupts are disabled during the entire
    context switch operation.  But some day we might like to leave
    interrupts enabled during the context switch and this change
    allows that to happen without any surprises.
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6f25f398
smp.c 34.2 KB