[PATCH] arm64: spinlocks: implement smp_mb__before_spinlock() as smp_mb()
Catalin Marinas
catalin.marinas at arm.com
Fri Sep 9 04:34:11 PDT 2016
On Mon, Sep 05, 2016 at 11:56:05AM +0100, Will Deacon wrote:
> smp_mb__before_spinlock() is intended to upgrade a spin_lock() operation
> to a full barrier, such that prior stores are ordered with respect to
> loads and stores occuring inside the critical section.
>
> Unfortunately, the core code defines the barrier as smp_wmb(), which
> is insufficient to provide the required ordering guarantees when used in
> conjunction with our load-acquire-based spinlock implementation.
>
> This patch overrides the arm64 definition of smp_mb__before_spinlock()
> to map to a full smp_mb().
>
> Cc: <stable at vger.kernel.org>
> Cc: Peter Zijlstra <peterz at infradead.org>
> Reported-by: Alan Stern <stern at rowland.harvard.edu>
> Signed-off-by: Will Deacon <will.deacon at arm.com>
Queued for -rc6. Thanks.
--
Catalin
More information about the linux-arm-kernel
mailing list