]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/fsl-booke: Work around erratum A-006958
authorScott Wood <scottwood@freescale.com>
Wed, 24 Jul 2013 01:21:11 +0000 (20:21 -0500)
committerScott Wood <scottwood@freescale.com>
Tue, 20 Aug 2013 20:45:49 +0000 (15:45 -0500)
commit50e462336c3b335fcd90eaaaa5abb1b932af5164
treeb0e14ee68283d438d4ee5baa89d4a652f753a8b2
parent20a5972def091db3c20c64ddb1ef75c181012b21
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>
arch/powerpc/include/asm/cputable.h
arch/powerpc/include/asm/ppc_asm.h
arch/powerpc/include/asm/reg.h
arch/powerpc/platforms/85xx/smp.c