aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/ppc_asm.h
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2013-07-23 20:21:11 -0500
committerScott Wood <scottwood@freescale.com>2013-08-20 15:45:49 -0500
commitd52459ca3047435aa5d7957e50857fc7ba193411 (patch)
treeb0e14ee68283d438d4ee5baa89d4a652f753a8b2 /arch/powerpc/include/asm/ppc_asm.h
parentpowerpc/wsp: Fix early debug build (diff)
downloadlinux-dev-d52459ca3047435aa5d7957e50857fc7ba193411.tar.xz
linux-dev-d52459ca3047435aa5d7957e50857fc7ba193411.zip
powerpc/fsl-booke: Work around erratum A-006958
Erratum A-006598 says that 64-bit mftb is not atomic -- it's subject to a similar race condition as doing mftbu/mftbl on 32-bit. The lower half of timebase is updated before the upper half; thus, we can share the workaround for a similar bug on Cell. This workaround involves looping if the lower half of timebase is zero, thus avoiding the need for a scratch register (other than CR0). This workaround must be avoided when the timebase is frozen, such as during the timebase sync code. This deals with kernel and vdso accesses, but other userspace accesses will of course need to be fixed elsewhere. Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'arch/powerpc/include/asm/ppc_asm.h')
-rw-r--r--arch/powerpc/include/asm/ppc_asm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
index 4ebb4f8f4188..8fdd3da134e0 100644
--- a/arch/powerpc/include/asm/ppc_asm.h
+++ b/arch/powerpc/include/asm/ppc_asm.h
@@ -431,7 +431,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_601)
#define ISYNC_601
#endif
-#ifdef CONFIG_PPC_CELL
+#if defined(CONFIG_PPC_CELL) || defined(CONFIG_PPC_FSL_BOOK3E)
#define MFTB(dest) \
90: mftb dest; \
BEGIN_FTR_SECTION_NESTED(96); \