]> err.no Git - linux-2.6/commit
[POWERPC] Fix small race in 44x tlbie function
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 7 Aug 2007 04:20:50 +0000 (14:20 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 15 Aug 2007 05:12:50 +0000 (15:12 +1000)
commitaa1cf632bd6f998cb4567ccf1a9d2e5daaa9fb44
tree83a94ce1f8ec1749cfefd8c280297c9e404e6452
parentfa6b769a8e981afea869285982640168f76774df
[POWERPC] Fix small race in 44x tlbie function

The 440 family of processors don't have a tlbie instruction.  So, we
implement TLB invalidates by explicitly searching the TLB with tlbsx.,
then clobbering the relevant entry, if any.  Unfortunately the PID for
the search needs to be stored in the MMUCR register, which is also
used by the TLB miss handler.  Interrupts were enabled in _tlbie(), so
an interrupt between loading the MMUCR and the tlbsx could cause
incorrect search results, and thus a failure to invalide TLB entries
which needed to be invalidated.

This fixes the problem in both arch/ppc and arch/powerpc by inhibiting
interrupts (even critical and debug interrupts) across the relevant
instructions.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/misc_32.S
arch/ppc/kernel/misc.S