This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC][PATCH] powerpc: Change atomic_write_barrier to have release semantics.
- From: Torvald Riegel <triegel at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Fri, 31 Oct 2014 23:50:17 +0100
- Subject: Re: [RFC][PATCH] powerpc: Change atomic_write_barrier to have release semantics.
- Authentication-results: sourceware.org; auth=none
- References: <1413920900 dot 8483 dot 59 dot camel at triegel dot csb> <5453CB1A dot 50902 at linux dot vnet dot ibm dot com>
On Fri, 2014-10-31 at 15:47 -0200, Adhemerval Zanella wrote:
> On 21-10-2014 17:48, Torvald Riegel wrote:
> > Based on my scan of existing code, atomic_write_barrier is used as if it
> > were a C11 memory_order_release fence. However, powerpc uses "eieio"
> > currently, which, AFAIK, prohibits reordering of *only* stores.
> > "lwsync" is used as release fence in other parts of the implementation
> > (e.g., _rel versions of atomic ops), and it is a valid implementation of
> > C11 memory_order_release fences. Therefore, this patch changes
> > atomic_write_barrier to use "lwsync" when available, or "sync"
> > otherwise.
> >
> > I have NOT tested this. Can somebody who cares about powerpc please
> > have a look and test? Thanks!
>
> I was about to send a similar patch. This looks ok, thanks.
Committed.