linux/arch/arm64/include
Will Deacon ca88b6d979 arm64: spinlocks: implement smp_mb__before_spinlock() as smp_mb()
commit 872c63fbf9 upstream.

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: Peter Zijlstra <peterz@infradead.org>
Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2016-11-20 01:17:24 +00:00
..
asm arm64: spinlocks: implement smp_mb__before_spinlock() as smp_mb() 2016-11-20 01:17:24 +00:00
uapi/asm arm64: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO 2016-11-20 01:17:00 +00:00