summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/llsc.h
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@mips.com>2019-10-02 00:53:06 +0300
committerPaul Burton <paul.burton@mips.com>2019-10-07 19:42:14 +0300
commitef85d057a605c36063a15345be87a45e0affba88 (patch)
tree8f2f1c2143a8cb51de33f3368ae4307e6836e9a8 /arch/mips/include/asm/llsc.h
parent878f75c7a2530471844a93b01e887f09d24ed57f (diff)
downloadlinux-ef85d057a605c36063a15345be87a45e0affba88.tar.xz
MIPS: Use compact branch for LL/SC loops on MIPSr6+
When targeting MIPSr6 or higher make use of a compact branch in LL/SC loops, preventing the insertion of a delay slot nop that only serves to waste space. 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
Diffstat (limited to 'arch/mips/include/asm/llsc.h')
-rw-r--r--arch/mips/include/asm/llsc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/include/asm/llsc.h b/arch/mips/include/asm/llsc.h
index 9b19f38562ac..d240a4a2d1c4 100644
--- a/arch/mips/include/asm/llsc.h
+++ b/arch/mips/include/asm/llsc.h
@@ -9,6 +9,8 @@
#ifndef __ASM_LLSC_H
#define __ASM_LLSC_H
+#include <asm/isa-rev.h>
+
#if _MIPS_SZLONG == 32
#define SZLONG_LOG 5
#define SZLONG_MASK 31UL
@@ -32,6 +34,8 @@
*/
#if R10000_LLSC_WAR
# define __SC_BEQZ "beqzl "
+#elif MIPS_ISA_REV >= 6
+# define __SC_BEQZ "beqzc "
#else
# define __SC_BEQZ "beqz "
#endif