asm/rwonce: Allow __READ_ONCE to be overridden by the architecture
authorWill Deacon <will@kernel.org>
Wed, 16 Oct 2019 00:30:47 +0000 (17:30 -0700)
committerWill Deacon <will@kernel.org>
Tue, 21 Jul 2020 09:50:35 +0000 (10:50 +0100)
commitb78b331a3f5c0773171dadd6bbfa2a2242b45604
tree6e9a048a1026a379b549760c863e636539e10863
parente506ea451254ab17e0bf918ca36232fec2a9b10c
asm/rwonce: Allow __READ_ONCE to be overridden by the architecture

The meat and potatoes of READ_ONCE() is defined by the __READ_ONCE()
macro, which uses a volatile casts in an attempt to avoid tearing of
byte, halfword, word and double-word accesses. Allow this to be
overridden by the architecture code in the case that things like memory
barriers are also required.

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
include/asm-generic/rwonce.h