]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
MIPS: Loongson2ef: Disable Loongson MMI instructions
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Wed, 23 Sep 2020 10:33:12 +0000 (18:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 15:36:34 +0000 (17:36 +0200)
commit b13812ddea615b6507beef24f76540c0c1143c5c upstream.

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+.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Fixes: 71e2f4dd5a65 ("MIPS: Fork loongson2ef from loongson64")
Reported-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: stable@vger.kernel.org # v5.8+
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/loongson2ef/Platform

index cdad3c1a9a18fea3875868d36890898520a9eaa6..7db0935bda3d1660cdfece64676873f460a85ce7 100644 (file)
@@ -22,6 +22,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
 #