]> git.baikalelectronics.ru Git - kernel.git/commit
compiler.h: Remove data_race() and unnecessary checks from {READ,WRITE}_ONCE()
authorMarco Elver <elver@google.com>
Thu, 21 May 2020 14:20:44 +0000 (16:20 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 11 Jun 2020 18:04:03 +0000 (20:04 +0200)
commitfbf692b26afc3523353edfa6c5faf2b5c2058815
tree51af718dd6e23737c8ee29bab352f52c71a995e6
parent6d5a10d97a3140902f945e76678bf0230f1c2d18
compiler.h: Remove data_race() and unnecessary checks from {READ,WRITE}_ONCE()

The volatile accesses no longer need to be wrapped in data_race()
because compilers that emit instrumentation distinguishing volatile
accesses are required for KCSAN.

Consequently, the explicit kcsan_check_atomic*() are no longer required
either since the compiler emits instrumentation distinguishing the
volatile accesses.

Finally, simplify __READ_ONCE_SCALAR() and remove __WRITE_ONCE_SCALAR().

 [ bp: Convert commit message to passive voice. ]

Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lkml.kernel.org/r/20200521142047.169334-9-elver@google.com
include/linux/compiler.h