linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: Loongson2ef: Disable Loongson MMI instructions
@ 2020-09-23 10:33 Jiaxun Yang
  2020-09-24 13:51 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 2+ messages in thread
From: Jiaxun Yang @ 2020-09-23 10:33 UTC (permalink / raw)
  To: linux-mips
  Cc: Jiaxun Yang, Thomas Bogendoerfer, stable, Paul Burton, linux-kernel

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+
---
 arch/mips/loongson2ef/Platform | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/mips/loongson2ef/Platform b/arch/mips/loongson2ef/Platform
index 4ab55f1123a0..ae023b9a1c51 100644
--- a/arch/mips/loongson2ef/Platform
+++ b/arch/mips/loongson2ef/Platform
@@ -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
 #
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: Loongson2ef: Disable Loongson MMI instructions
  2020-09-23 10:33 [PATCH] MIPS: Loongson2ef: Disable Loongson MMI instructions Jiaxun Yang
@ 2020-09-24 13:51 ` Thomas Bogendoerfer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2020-09-24 13:51 UTC (permalink / raw)
  To: Jiaxun Yang; +Cc: linux-mips, stable, Paul Burton, linux-kernel

On Wed, Sep 23, 2020 at 06:33:12PM +0800, Jiaxun Yang wrote:
> 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+
> ---
>  arch/mips/loongson2ef/Platform | 4 ++++
>  1 file changed, 4 insertions(+)

applied to mips-fixes.

Thomas.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-24 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-23 10:33 [PATCH] MIPS: Loongson2ef: Disable Loongson MMI instructions Jiaxun Yang
2020-09-24 13:51 ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).