]> err.no Git - linux-2.6/commit
[POWERPC] Cell timebase bug workaround
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 20 Oct 2006 04:37:05 +0000 (14:37 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 25 Oct 2006 01:54:18 +0000 (11:54 +1000)
commit859deea949c382d9ccb6397fe33df3703ecef45d
treeb0fe2d7a814143f3ff61a73a0727522a1a3dd6e4
parent21c4ff80cba5e24932f3ef79c8482c0491630b2b
[POWERPC] Cell timebase bug workaround

The Cell CPU timebase has an erratum. When reading the entire 64 bits
of the timebase with one mftb instruction, there is a handful of cycles
window during which one might read a value with the low order 32 bits
already reset to 0x00000000 but the high order bits not yet incremeted
by one. This fixes it by reading the timebase again until the low order
32 bits is no longer 0. That might introduce occasional latencies if
hitting mftb just at the wrong time, but no more than 70ns on a cell
blade, and that was considered acceptable.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/vdso64/gettimeofday.S
include/asm-powerpc/cputable.h
include/asm-powerpc/ppc_asm.h
include/asm-powerpc/reg.h
include/asm-powerpc/time.h
include/asm-powerpc/timex.h