linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: MT extensions are not available on MIPS32r1
       [not found] <202106192349.LlB9JRTC-lkp@intel.com>
@ 2021-06-25 10:49 ` Paul Cercueil
  2021-06-29  8:31   ` Thomas Bogendoerfer
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Cercueil @ 2021-06-25 10:49 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: list, linux-mips, linux-kernel, Paul Cercueil, stable

MIPS MT extensions were added with the MIPS 34K processor, which was
based on the MIPS32r2 ISA.

This fixes a build error when building a generic kernel for a MIPS32r1
CPU.

Fixes: c434b9f80b09 ("MIPS: Kconfig: add MIPS_GENERIC_KERNEL symbol")
Cc: stable@vger.kernel.org # v5.9
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 arch/mips/include/asm/cpu-features.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h
index 78cf7e300f12..f98892fd8f1d 100644
--- a/arch/mips/include/asm/cpu-features.h
+++ b/arch/mips/include/asm/cpu-features.h
@@ -64,6 +64,8 @@
 	((MIPS_ISA_REV >= (ge)) && (MIPS_ISA_REV < (lt)))
 #define __isa_range_or_flag(ge, lt, flag) \
 	(__isa_range(ge, lt) || ((MIPS_ISA_REV < (lt)) && __isa(flag)))
+#define __isa_range_and_ase(ge, lt, ase) \
+	(__isa_range(ge, lt) && __ase(ase))
 
 /*
  * SMP assumption: Options of CPU 0 are a superset of all processors.
@@ -426,7 +428,7 @@
 #endif
 
 #ifndef cpu_has_mipsmt
-#define cpu_has_mipsmt		__isa_lt_and_ase(6, MIPS_ASE_MIPSMT)
+#define cpu_has_mipsmt		__isa_range_and_ase(2, 6, MIPS_ASE_MIPSMT)
 #endif
 
 #ifndef cpu_has_vp
-- 
2.30.2


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

* Re: [PATCH] MIPS: MT extensions are not available on MIPS32r1
  2021-06-25 10:49 ` [PATCH] MIPS: MT extensions are not available on MIPS32r1 Paul Cercueil
@ 2021-06-29  8:31   ` Thomas Bogendoerfer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2021-06-29  8:31 UTC (permalink / raw)
  To: Paul Cercueil; +Cc: list, linux-mips, linux-kernel, stable

On Fri, Jun 25, 2021 at 11:49:29AM +0100, Paul Cercueil wrote:
> MIPS MT extensions were added with the MIPS 34K processor, which was
> based on the MIPS32r2 ISA.
> 
> This fixes a build error when building a generic kernel for a MIPS32r1
> CPU.
> 
> Fixes: c434b9f80b09 ("MIPS: Kconfig: add MIPS_GENERIC_KERNEL symbol")
> Cc: stable@vger.kernel.org # v5.9
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  arch/mips/include/asm/cpu-features.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

applied to mips-next.

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:[~2021-06-29  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <202106192349.LlB9JRTC-lkp@intel.com>
2021-06-25 10:49 ` [PATCH] MIPS: MT extensions are not available on MIPS32r1 Paul Cercueil
2021-06-29  8:31   ` 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).