OSDN Git Service

MIPS: bitops: Avoid redundant zero-comparison for non-LLSC
authorPaul Burton <paul.burton@mips.com>
Tue, 1 Oct 2019 21:53:32 +0000 (21:53 +0000)
committerPaul Burton <paul.burton@mips.com>
Mon, 7 Oct 2019 16:42:52 +0000 (09:42 -0700)
commitaad028cadb17867d257e8b90078f6a19614775ff
treeebc5bbb543dc184474688797f4de13303496b911
parentd6103510e7ccdc992e4eca7031eae366117ae6d4
MIPS: bitops: Avoid redundant zero-comparison for non-LLSC

The IRQ-disabling non-LLSC fallbacks for bitops on UP systems already
return a zero or one, so there's no need to perform another comparison
against zero. Move these comparisons into the LLSC paths to avoid the
redundant work.

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