From 6adb632eebd6382298074ead447231dd9e233301 Mon Sep 17 00:00:00 2001 From: Marius Strobl Date: Sat, 23 Aug 2008 20:53:27 +0000 Subject: [PATCH] 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 --- sys/sparc64/include/cpufunc.h | 8 +++++--- 1 file 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)); \