[RFC][PATCH] powerpc: Change atomic_write_barrier to have release semantics.
Adhemerval Zanella
azanella@linux.vnet.ibm.com
Fri Oct 31 17:47:00 GMT 2014
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.
More information about the Libc-alpha
mailing list