aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64/include/cpufunc.h
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2008-08-23 20:53:27 +0000
committerMarius Strobl <marius@FreeBSD.org>2008-08-23 20:53:27 +0000
commit6adb632eebd6382298074ead447231dd9e233301 (patch)
tree4cfbec1e1a9fd171e83e0e3259b4baf42defc1cf /sys/sparc64/include/cpufunc.h
parenta4e1d2d2cfde85b62e144af001a5b5fd57e777e5 (diff)
downloadsrc-6adb632eebd6382298074ead447231dd9e233301.tar.gz
src-6adb632eebd6382298074ead447231dd9e233301.zip
Update the comment regarding the workaround for the BlackBird
TICK_COMPARE bug and the instruction alignment used for it based on information found in the OpenSolaris source. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=182078
Diffstat (limited to 'sys/sparc64/include/cpufunc.h')
-rw-r--r--sys/sparc64/include/cpufunc.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/sparc64/include/cpufunc.h b/sys/sparc64/include/cpufunc.h
index fca87e51cfeb..fca5984b772b 100644
--- a/sys/sparc64/include/cpufunc.h
+++ b/sys/sparc64/include/cpufunc.h
@@ -177,14 +177,16 @@ int fasword32(u_long asi, void *addr, uint32_t *val);
* Macro intended to be used instead of wr(asr23, val, xor) for writing to
* the TICK_COMPARE register in order to avoid a bug in BlackBird CPUs that
* can cause these writes to fail under certain condidtions which in turn
- * causes the hardclock to stop. The workaround is to perform the write
- * at the beginning of an I-Cache line directly followed by a dummy read.
+ * causes the hardclock to stop. The workaround is to read the TICK_COMPARE
+ * register back immediately after writing to it with these two instructions
+ * aligned to a quadword boundary in order to ensure that I$ misses won't
+ * split them up.
*/
#define wrtickcmpr(val, xor) ({ \
__asm __volatile( \
" ba,pt %%xcc, 1f ; " \
" nop ; " \
- " .align 64 ; " \
+ " .align 128 ; " \
"1: wr %0, %1, %%asr23 ; " \
" rd %%asr23, %%g0 ; " \
: : "r" (val), "rI" (xor)); \