[SPARC64]: Make tsb_sync() mm comparison more precise.
authorDavid S. Miller <davem@davemloft.net>
Tue, 28 Mar 2006 21:29:26 +0000 (13:29 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sat, 1 Apr 2006 07:03:34 +0000 (23:03 -0800)
commit6f25f3986af0353b0bdc220f79b89c997d0ceda4
tree2c5dc949eff3cc3c216432d2034e159b579a6da9
parent683aa4012f53b2ada0f430487e05d37b0d94e90a
[SPARC64]: Make tsb_sync() mm comparison more precise.

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: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/smp.c