]> git.baikalelectronics.ru Git - kernel.git/commit
locking/atomic: simplify non-atomic wrappers
authorMark Rutland <mark.rutland@arm.com>
Wed, 21 Jul 2021 15:58:13 +0000 (16:58 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 4 Aug 2021 13:16:47 +0000 (15:16 +0200)
commit01706ebae6bcab0e3a8aab83b0879f85946833af
treec1e263dff46d665f806133950674a3d5d90587d3
parent00a5435c52843b24d63fa39322fc27b0b089ee10
locking/atomic: simplify non-atomic wrappers

Since the non-atomic arch_*() bitops use plain accesses, they are
implicitly instrumnted by the compiler, and we work around this in the
instrumented wrappers to avoid double instrumentation.

It's simpler to avoid the wrappers entirely, and use the preprocessor to
alias the arch_*() bitops to their regular versions, removing the need
for checks in the instrumented wrappers.

Suggested-by: Marco Elver <elver@google.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Marco Elver <elver@google.com>
Link: https://lore.kernel.org/r/20210721155813.17082-1-mark.rutland@arm.com
include/asm-generic/bitops/instrumented-non-atomic.h
include/asm-generic/bitops/non-atomic.h