diff options
author | Torvald Riegel <triegel@redhat.com> | 2014-10-18 01:01:58 +0200 |
---|---|---|
committer | Torvald Riegel <triegel@redhat.com> | 2014-10-31 23:26:22 +0100 |
commit | 7f981fc24a9156dba8cfe5e7eb8e87fa9d793f2a (patch) | |
tree | 10ccc3e9173f0b5a94a9209ab86d6e591b45fafe | |
parent | d6f373d21b19565838cb9848c15b8070f2fe1305 (diff) | |
download | glibc-7f981fc24a9156dba8cfe5e7eb8e87fa9d793f2a.zip glibc-7f981fc24a9156dba8cfe5e7eb8e87fa9d793f2a.tar.gz glibc-7f981fc24a9156dba8cfe5e7eb8e87fa9d793f2a.tar.bz2 |
powerpc: Change atomic_write_barrier to have release semantics.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | sysdeps/powerpc/bits/atomic.h | 1 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc32/bits/atomic.h | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/bits/atomic.h | 1 |
4 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,11 @@ +2014-10-31 Torvald Riegel <triegel@redhat.com> + + * sysdeps/powerpc/bits/atomic.h (atomic_write_barrier): Remove and... + * sysdeps/powerpc/powerpc32/bits/atomic.h (atomic_write_barrier): + ... add here and use lwsync or sync ... + * sysdeps/powerpc/powerpc64/bits/atomic.h (atomic_write_barrier): + ... and add here using lwsync. + 2014-10-31 Matthew Fortune <matthew.fortune@imgtec.com> * elf/dl-machine-reject-phdr.h: New file. diff --git a/sysdeps/powerpc/bits/atomic.h b/sysdeps/powerpc/bits/atomic.h index 2ffba48..f312676 100644 --- a/sysdeps/powerpc/bits/atomic.h +++ b/sysdeps/powerpc/bits/atomic.h @@ -77,7 +77,6 @@ typedef uintmax_t uatomic_max_t; #endif #define atomic_full_barrier() __asm ("sync" ::: "memory") -#define atomic_write_barrier() __asm ("eieio" ::: "memory") #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ ({ \ diff --git a/sysdeps/powerpc/powerpc32/bits/atomic.h b/sysdeps/powerpc/powerpc32/bits/atomic.h index 7613bdc..a3dd09c 100644 --- a/sysdeps/powerpc/powerpc32/bits/atomic.h +++ b/sysdeps/powerpc/powerpc32/bits/atomic.h @@ -117,6 +117,7 @@ # ifndef UP # define __ARCH_REL_INSTR "lwsync" # endif +# define atomic_write_barrier() __asm ("lwsync" ::: "memory") #else /* * Older powerpc32 processors don't support the new "light weight" @@ -124,6 +125,7 @@ * for all powerpc32 applications. */ # define atomic_read_barrier() __asm ("sync" ::: "memory") +# define atomic_write_barrier() __asm ("sync" ::: "memory") #endif /* diff --git a/sysdeps/powerpc/powerpc64/bits/atomic.h b/sysdeps/powerpc/powerpc64/bits/atomic.h index 527fe7c..ed26b72 100644 --- a/sysdeps/powerpc/powerpc64/bits/atomic.h +++ b/sysdeps/powerpc/powerpc64/bits/atomic.h @@ -234,6 +234,7 @@ #ifndef UP # define __ARCH_REL_INSTR "lwsync" #endif +#define atomic_write_barrier() __asm ("lwsync" ::: "memory") /* * Include the rest of the atomic ops macros which are common to both |