From fea04b0ffeaa83716937f1728ff6742722cec91a Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 7 Mar 2011 00:17:08 +0000 Subject: [PATCH] 3064. [bug] powerpc: add sync instructions to the end of atomic operations. [RT #23469] --- CHANGES | 3 +++ lib/isc/powerpc/include/isc/atomic.h | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 2ababacfcb..943991b7a7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +3064. [bug] powerpc: add sync instructions to the end of atomic + operations. [RT #23469] + 3063. [contrib] More verbose error reporting from DLZ LDAP. [RT #23402] 3062. [func] Made several changes to enhance human readability diff --git a/lib/isc/powerpc/include/isc/atomic.h b/lib/isc/powerpc/include/isc/atomic.h index 6f54cc3b48..c8a617fd8a 100644 --- a/lib/isc/powerpc/include/isc/atomic.h +++ b/lib/isc/powerpc/include/isc/atomic.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: atomic.h,v 1.8 2009/10/14 23:47:51 tbox Exp $ */ +/* $Id: atomic.h,v 1.9 2011/03/07 00:17:08 marka Exp $ */ #ifndef ISC_ATOMIC_H #define ISC_ATOMIC_H 1 @@ -117,7 +117,8 @@ isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) { "mr %0, 6\n" "add 6, 6, %2\n" "stwcx. 6, 0, %1\n" - "bne- 1b" + "bne- 1b\n" + "sync" #endif : "=&r"(orig) : "r"(p), "r"(val) @@ -141,7 +142,8 @@ isc_atomic_store(void *p, isc_int32_t val) { "lwarx 6, 0, %0\n" "lwz 6, %1\n" "stwcx. 6, 0, %0\n" - "bne- 1b" + "bne- 1b\n" + "sync" #endif : : "r"(p), "m"(val) @@ -173,7 +175,8 @@ isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) { "mr 6, %3\n" "stwcx. 6, 0, %1\n" "bne- 1b\n" - "2:" + "2:\n" + "sync" #endif : "=&r" (orig) : "r"(p), "r"(cmpval), "r"(val)