MIPS: barrier: Clean up __sync() definition
authorPaul Burton <paul.burton@mips.com>
Tue, 1 Oct 2019 21:53:13 +0000 (21:53 +0000)
committerPaul Burton <paul.burton@mips.com>
Mon, 7 Oct 2019 16:42:22 +0000 (09:42 -0700)
commitfe0065e56227a2f6a6ad717c6d8d871263e482a8
tree0e0eb1fd53d58310e2b5c7c33ab4c1711b0e9db6
parent5c12a6eff6ae3ed32f1c4d6458e58e6c4e9b2352
MIPS: barrier: Clean up __sync() definition

Implement __sync() using the new __SYNC() infrastructure, which will
take care of not emitting an instruction for old R3k CPUs that don't
support it. The only behavioral difference is that __sync() will now
provide a compiler barrier on these old CPUs, but that seems like
reasonable behavior anyway.

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/barrier.h