Re: [PATCH v6 2/4] powerpc: atomic: Implement atomic{, 64}_*_return_* variants

2016-01-05 Thread Boqun Feng
Hi all, I will resend this one to avoid a potential conflict with: http://article.gmane.org/gmane.linux.kernel/2116880 by open coding smp_lwsync() with: __asm__ __volatile__(PPC_ACQUIRE_BARRIER "" : : : "memory"); Regards, Boqun signature.asc Description: PGP signature

[PATCH v6 2/4] powerpc: atomic: Implement atomic{, 64}_*_return_* variants

2015-12-15 Thread Boqun Feng
On powerpc, acquire and release semantics can be achieved with lightweight barriers("lwsync" and "ctrl+isync"), which can be used to implement __atomic_op_{acquire,release}. For release semantics, since we only need to ensure all memory accesses that issue before must take effects before the