Re: [v2] powerpc: spinlock: Fix spin_unlock_wait()

2016-06-06 Thread Michael Ellerman
On Fri, 2016-03-06 at 03:49:48 UTC, Boqun Feng wrote: > diff --git a/arch/powerpc/include/asm/spinlock.h > b/arch/powerpc/include/asm/spinlock.h > index 523673d7583c..2ed893662866 100644 > --- a/arch/powerpc/include/asm/spinlock.h > +++ b/arch/powerpc/include/asm/spinlock.h > @@ -64,6 +64,25 @@

Re: [v2] powerpc: spinlock: Fix spin_unlock_wait()

2016-06-06 Thread Michael Ellerman
On Fri, 2016-03-06 at 03:49:48 UTC, Boqun Feng wrote: > diff --git a/arch/powerpc/include/asm/spinlock.h > b/arch/powerpc/include/asm/spinlock.h > index 523673d7583c..2ed893662866 100644 > --- a/arch/powerpc/include/asm/spinlock.h > +++ b/arch/powerpc/include/asm/spinlock.h > @@ -64,6 +64,25 @@

Re: [v2] powerpc: spinlock: Fix spin_unlock_wait()

2016-06-05 Thread Boqun Feng
On Mon, Jun 06, 2016 at 02:52:05PM +1000, Michael Ellerman wrote: > On Fri, 2016-03-06 at 03:49:48 UTC, Boqun Feng wrote: > > 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

Re: [v2] powerpc: spinlock: Fix spin_unlock_wait()

2016-06-05 Thread Boqun Feng
On Mon, Jun 06, 2016 at 02:52:05PM +1000, Michael Ellerman wrote: > On Fri, 2016-03-06 at 03:49:48 UTC, Boqun Feng wrote: > > 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

Re: [v2] powerpc: spinlock: Fix spin_unlock_wait()

2016-06-05 Thread Michael Ellerman
On Fri, 2016-03-06 at 03:49:48 UTC, Boqun Feng wrote: > 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. ... > diff --git

Re: [v2] powerpc: spinlock: Fix spin_unlock_wait()

2016-06-05 Thread Michael Ellerman
On Fri, 2016-03-06 at 03:49:48 UTC, Boqun Feng wrote: > 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. ... > diff --git

[PATCH v2] powerpc: spinlock: Fix spin_unlock_wait()

2016-06-02 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 v2] powerpc: spinlock: Fix spin_unlock_wait()

2016-06-02 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