alpha: Override READ_ONCE() with barriered implementation
authorWill Deacon <will@kernel.org>
Wed, 30 Oct 2019 16:50:10 +0000 (16:50 +0000)
committerWill Deacon <will@kernel.org>
Tue, 21 Jul 2020 09:50:35 +0000 (10:50 +0100)
commitd6462858851549c62d73eaa14b31132b0f32d6b6
tree058dbd3fd192d8e00b621b1fbbb9e4995c37093b
parentb78b331a3f5c0773171dadd6bbfa2a2242b45604
alpha: Override READ_ONCE() with barriered implementation

Rather then relying on the core code to use smp_read_barrier_depends()
as part of the READ_ONCE() definition, instead override __READ_ONCE()
in the Alpha code so that it generates the required mb() and then
implement smp_load_acquire() using the new macro to avoid redundant
back-to-back barriers from the generic implementation.

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
arch/alpha/include/asm/barrier.h
arch/alpha/include/asm/rwonce.h [new file with mode: 0644]