diff options
author | Will Deacon <will.deacon@arm.com> | 2016-09-05 11:56:05 +0100 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2016-10-02 20:32:27 -0400 |
commit | f2ec3a1c749bd4de9de3e74e2c8428493cab9678 (patch) | |
tree | 59e4dae218b0e57dea5cbc7c6eacff9d36645d78 /include/linux/i2c.h | |
parent | 323d5348592074c37fbda31cdbb6c0a7f7ddfe31 (diff) |
arm64: spinlocks: implement smp_mb__before_spinlock() as smp_mb()
[ Upstream commit 872c63fbf9e153146b07f0cece4da0d70b283eeb ]
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@vger.kernel.org>
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: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'include/linux/i2c.h')
0 files changed, 0 insertions, 0 deletions