diff options
author | Paul E. Murphy <murphyp@linux.vnet.ibm.com> | 2015-08-13 16:21:05 -0500 |
---|---|---|
committer | Paul E. Murphy <murphyp@linux.vnet.ibm.com> | 2015-09-01 09:43:13 -0500 |
commit | d8d584d4c38e8fd5d641937aff7fa2303bbee314 (patch) | |
tree | c72e7711ff43d620a8123eae6ca8de95fd3948d0 | |
parent | 0a512fb591621e2c26efaf5ecc95e87763978386 (diff) | |
download | glibc-d8d584d4c38e8fd5d641937aff7fa2303bbee314.zip glibc-d8d584d4c38e8fd5d641937aff7fa2303bbee314.tar.gz glibc-d8d584d4c38e8fd5d641937aff7fa2303bbee314.tar.bz2 |
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 <murphyp@linux.vnet.ibm.com>
* 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.
(cherry picked from commit 6eb901de9b8c3a582ec2a5fc9a2223f326800812)
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/elision-lock.c | 21 |
2 files changed, 6 insertions, 21 deletions
@@ -1,3 +1,9 @@ +2015-09-01 Paul E. Murphy <murphyp@linux.vnet.ibm.com> + + * 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-05-11 Andreas Schwab <schwab@suse.de> [BZ #18007] diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-lock.c b/sysdeps/unix/sysv/linux/powerpc/elision-lock.c index 2ce75b2..8c13a29 100644 --- a/sysdeps/unix/sysv/linux/powerpc/elision-lock.c +++ b/sysdeps/unix/sysv/linux/powerpc/elision-lock.c @@ -23,27 +23,6 @@ #include <elision-conf.h> #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. */ |