Skip to contentSkip to conversation

MIPS: Loongson2ef: Disable Loongson MMI instructions

PATCH Applied Jiaxun Yang 2 participants 2 messages Sep 23, 2020 – Sep 24, 2020

Subsystems (3)
lore
Share & tools
lore

Jiaxun Yang

author maintainer
#0 lore raw

PATCH 1/1 MIPS: Loongson2ef: Disable Loongson MMI instructions

It was missed when I was forking Loongson2ef from Loongson64 but should be applied to Loongson2ef as march=loongson2f will also enable Loongson MMI in GCC-9+.

Fixes 71e2f4dd5a65 ("MIPS: Fork loongson2ef from loongson64")
---
 arch/mips/loongson2ef/Platform | 4 ++++
 1 file changed, 4 insertions(+)
arch/mips/loongson2ef/Platform +4 -0
index 4ab55f1123a0..ae023b9a1c51 100644
@@ -44,6 +44,10 @@ ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS
   endif
 endif
 
+# Some -march= flags enable MMI instructions, and GCC complains about that
+# support being enabled alongside -msoft-float. Thus explicitly disable MMI.
+cflags-y += $(call cc-option,-mno-loongson-mmi)
+
 #
 # Loongson Machines' Support
 #
Signature · 1 line
2.28.0
maintainer Applied
#1 lore raw
Quoted 11 lines · Jiaxun Yang

It was missed when I was forking Loongson2ef from Loongson64 but should be applied to Loongson2ef as march=loongson2f will also enable Loongson MMI in GCC-9+.

Fixes 71e2f4dd5a65 ("MIPS: Fork loongson2ef from loongson64")
---
 arch/mips/loongson2ef/Platform | 4 ++++
 1 file changed, 4 insertions(+)

applied to mips-fixes.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]