OSDN Git Service

MIPS: bitops: Emit Loongson3 sync workarounds within asm
authorPaul Burton <paul.burton@mips.com>
Tue, 1 Oct 2019 21:53:35 +0000 (21:53 +0000)
committerPaul Burton <paul.burton@mips.com>
Mon, 7 Oct 2019 16:42:57 +0000 (09:42 -0700)
commit5bb29275df7a7aab8b6c29686109cc5cb1015850
tree90fd885c4c206601b40fd1114902355fc755553e
parentc042be02d730534ee93cb446f194a558b5a84adf
MIPS: bitops: Emit Loongson3 sync workarounds within asm

Generate the sync instructions required to workaround Loongson3 LL/SC
errata within inline asm blocks, which feels a little safer than doing
it from C where strictly speaking the compiler would be well within its
rights to insert a memory access between the separate asm statements we
previously had, containing sync & ll instructions respectively.

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