MIPS: bitops: Use smp_mb__before_atomic in test_* ops
authorPaul Burton <paul.burton@mips.com>
Tue, 1 Oct 2019 21:53:36 +0000 (21:53 +0000)
committerPaul Burton <paul.burton@mips.com>
Mon, 7 Oct 2019 16:42:58 +0000 (09:42 -0700)
commit9026737703aeee35702a0f990811e9202469c7b4
treed1a7e76850353be17193a10eb6e8bcef2f52e5ed
parent5bb29275df7a7aab8b6c29686109cc5cb1015850
MIPS: bitops: Use smp_mb__before_atomic in test_* ops

Use smp_mb__before_atomic() rather than smp_mb__before_llsc() in
test_and_set_bit(), test_and_clear_bit() & test_and_change_bit(). The
_atomic() versions make semantic sense in these cases, and will allow a
later patch to omit redundant barriers for Loongson3 systems that
already include a barrier within __test_bit_op().

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
Cc: Huacai Chen <chenhc@lemote.com>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: linux-kernel@vger.kernel.org
arch/mips/include/asm/bitops.h