summaryrefslogtreecommitdiff
path: root/drivers/xen/time.c
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2019-12-16 19:51:45 +0300
committerWill Deacon <will@kernel.org>2020-04-16 14:20:33 +0300
commita5460b5e5fb82656807840d40d3deaecad094044 (patch)
tree0f68be2e8a0307f0ad918c3dec016e009f1c64f5 /drivers/xen/time.c
parentc6a771d932332568df9f46a3b53507c578e8c8e8 (diff)
downloadlinux-a5460b5e5fb82656807840d40d3deaecad094044.tar.xz
READ_ONCE: Simplify implementations of {READ,WRITE}_ONCE()
The implementations of {READ,WRITE}_ONCE() suffer from a significant amount of indirection and complexity due to a historic GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 which was originally worked around by 230fa253df63 ("kernel: Provide READ_ONCE and ASSIGN_ONCE"). Since GCC 4.8 is fairly vintage at this point and we emit a warning if we detect it during the build, return {READ,WRITE}_ONCE() to their former glory with an implementation that is easier to understand and, crucially, more amenable to optimisation. A side effect of this simplification is that WRITE_ONCE() no longer returns a value, but nobody seems to be relying on that and the new behaviour is aligned with smp_store_release(). Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/xen/time.c')
0 files changed, 0 insertions, 0 deletions