diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-10-20 00:37:05 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-10-24 21:54:18 -0400 |
commit | 859deea949c382d9ccb6397fe33df3703ecef45d (patch) | |
tree | b0fe2d7a814143f3ff61a73a0727522a1a3dd6e4 /include/asm-powerpc/cputable.h | |
parent | 21c4ff80cba5e24932f3ef79c8482c0491630b2b (diff) |
[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>
Diffstat (limited to 'include/asm-powerpc/cputable.h')
-rw-r--r-- | include/asm-powerpc/cputable.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 02e52d68cbbe..a9a40149a7c0 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -147,6 +147,7 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start, | |||
147 | #define CPU_FTR_CI_LARGE_PAGE LONG_ASM_CONST(0x0000100000000000) | 147 | #define CPU_FTR_CI_LARGE_PAGE LONG_ASM_CONST(0x0000100000000000) |
148 | #define CPU_FTR_PAUSE_ZERO LONG_ASM_CONST(0x0000200000000000) | 148 | #define CPU_FTR_PAUSE_ZERO LONG_ASM_CONST(0x0000200000000000) |
149 | #define CPU_FTR_PURR LONG_ASM_CONST(0x0000400000000000) | 149 | #define CPU_FTR_PURR LONG_ASM_CONST(0x0000400000000000) |
150 | #define CPU_FTR_CELL_TB_BUG LONG_ASM_CONST(0x0000800000000000) | ||
150 | 151 | ||
151 | #ifndef __ASSEMBLY__ | 152 | #ifndef __ASSEMBLY__ |
152 | 153 | ||
@@ -335,7 +336,7 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start, | |||
335 | #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 336 | #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
336 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ | 337 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
337 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 338 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
338 | CPU_FTR_PAUSE_ZERO | CPU_FTR_CI_LARGE_PAGE) | 339 | CPU_FTR_PAUSE_ZERO | CPU_FTR_CI_LARGE_PAGE | CPU_FTR_CELL_TB_BUG) |
339 | #define CPU_FTRS_PA6T (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 340 | #define CPU_FTRS_PA6T (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
340 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ | 341 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ |
341 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_CI_LARGE_PAGE | \ | 342 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_CI_LARGE_PAGE | \ |