Paul Burton a91f2a1dba
MIPS: cmpxchg: Omit redundant barriers for Loongson3
When building a kernel configured to support Loongson3 LL/SC workarounds
(ie. CONFIG_CPU_LOONGSON3_WORKAROUNDS=y) the inline assembly in
__xchg_asm() & __cmpxchg_asm() already emits completion barriers, and as
such we don't need to emit extra barriers from the xchg() or cmpxchg()
macros. Add compile-time constant checks causing us to omit the
redundant memory barriers.

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
2019-10-07 09:43:01 -07:00
..
2019-09-22 09:30:30 -07:00
2019-09-22 09:30:30 -07:00
2019-08-09 15:46:29 -07:00
2019-08-23 14:47:21 +01:00
2019-06-08 13:09:31 -07:00
2019-06-08 13:09:31 -07:00
2019-08-23 14:47:18 +01:00
2019-06-08 13:09:31 -07:00
2019-07-23 14:33:51 -07:00