]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[POWERPC] Avoid unpaired stwcx. on some processors
authorBecky Bruce <becky.bruce@freescale.com>
Fri, 9 Nov 2007 22:17:49 +0000 (09:17 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 13 Nov 2007 05:22:43 +0000 (16:22 +1100)
commitb64f87c16f3c00fe593f632e1ee5798ba3f4f3f4
tree1e0c63707b73c4b2f316a01b2e3c6ebd82c6356a
parent64c911a3f7c9864a4bbddbb77b722d5553ddcd32
[POWERPC] Avoid unpaired stwcx. on some processors

The context switch code in the kernel issues a dummy stwcx. to clear the
reservation, as recommended by the architecture.  However, some processors
can have issues if this stwcx to address A occurs while the reservation
is already held to a different address B.  To avoid this problem, the dummy
stwcx. needs to be paired with a dummy lwarx to the same address.

This adds the dummy lwarx, and creates a cpu feature bit to indicate
which cpus are affected.  Tested on mpc8641_hpcn_defconfig in
arch/powerpc; build tested in arch/ppc.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/entry_32.S
arch/ppc/kernel/entry.S
include/asm-powerpc/cputable.h