MIPS: bitops: Abstract LL/SC loops
authorPaul Burton <paul.burton@mips.com>
Tue, 1 Oct 2019 21:53:33 +0000 (21:53 +0000)
committerPaul Burton <paul.burton@mips.com>
Mon, 7 Oct 2019 16:42:53 +0000 (09:42 -0700)
commitcc99987c375e499a95572504d69c215591222072
treee305a0f24b3c9b338481de3d2bc56266b57dea60
parentaad028cadb17867d257e8b90078f6a19614775ff
MIPS: bitops: Abstract LL/SC loops

Introduce __bit_op() & __test_bit_op() macros which abstract away the
implementation of LL/SC loops. This cuts down on a lot of duplicate
boilerplate code, and also allows R10000_LLSC_WAR to be handled outside
of the individual bitop functions.

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