From: Paul E. Murphy Date: Wed, 26 Aug 2015 17:21:18 +0000 (-0500) Subject: powerpc: Revert to default atomic ops in elision code X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d9fd6a5a1733fd10099188b507795d09869c147;p=thirdparty%2Fglibc.git powerpc: Revert to default atomic ops in elision code Power ISA 2.07B section B.5.5 relaxed the barrier requirement around a TLE enabled lock. It is now identical to a traditional lock. 2015-08-26 Paul E. Murphy * sysdeps/unix/sysv/linux/powerpc/elision-lock.c (__arch_compare_and_exchange_val_32_acq): Remove and use common definition. ISA 2.07B no longer requires full sync. --- diff --git a/ChangeLog b/ChangeLog index 0f3a3c10736..826c5b1a875 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-08-26 Paul E. Murphy + + * sysdeps/unix/sysv/linux/powerpc/elision-lock.c + (__arch_compare_and_exchange_val_32_acq): Remove and use common + definition. ISA 2.07B no longer requires full sync. + 2015-08-26 Paul E. Murphy * sysdeps/powerpc/powerpc32/sysdep.h (ABORT_TRANSACTION): Use diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-lock.c b/sysdeps/unix/sysv/linux/powerpc/elision-lock.c index 7f9bcc2bf1e..26d272e619f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/elision-lock.c +++ b/sysdeps/unix/sysv/linux/powerpc/elision-lock.c @@ -23,27 +23,6 @@ #include #include "htm.h" -/* PowerISA 2.0.7 Section B.5.5 defines isync to be insufficient as a - barrier in acquire mechanism for HTM operations, a strong 'sync' is - required. */ -#undef __arch_compare_and_exchange_val_32_acq -#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ - ({ \ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ - "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ - " stwcx. %3,0,%1\n" \ - " bne- 1b\n" \ - "2: sync" \ - : "=&r" (__tmp) \ - : "b" (__memp), "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) - #if !defined(LLL_LOCK) && !defined(EXTRAARG) /* Make sure the configuration code is always linked in for static libraries. */