[PATCH powerpc/next] powerpc: spinlock: Fix spin_unlock_wait()

2016-04-19 Thread Boqun Feng
There is an ordering issue with spin_unlock_wait() on powerpc, because the spin_lock primitive is an ACQUIRE and an ACQUIRE is only ordering the load part of the operation with memory operations following it. Therefore the following event sequence can happen: CPU 1 CPU 2

[PATCH powerpc/next] powerpc: spinlock: Fix spin_unlock_wait()

2016-04-19 Thread Boqun Feng
There is an ordering issue with spin_unlock_wait() on powerpc, because the spin_lock primitive is an ACQUIRE and an ACQUIRE is only ordering the load part of the operation with memory operations following it. Therefore the following event sequence can happen: CPU 1 CPU 2