linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] MIPS: undefine and redefine cpu_has_fpu when it is overrided
@ 2022-04-29  3:26 Stephen Zhang
  2022-04-29  9:19 ` Maciej W. Rozycki
  2022-04-29  9:51 ` Thomas Bogendoerfer
  0 siblings, 2 replies; 8+ messages in thread
From: Stephen Zhang @ 2022-04-29  3:26 UTC (permalink / raw)
  To: tsbogend, liam.howlett, ebiederm, dbueso, alobakin, f.fainelli,
	paul, linux, anemo
  Cc: zhangshida, starzhangzsd, linux-kernel, linux-mips, Maciej W . Rozycki

From: Shida Zhang <zhangshida@kylinos.cn>

Undefine and redefine cpu_has_fpu to 0 when it is overridden with
the "nofpu" option.

Suggested-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Shida Zhang <zhangshida@kylinos.cn>
---
 Changelog in v1 -> v2:
 - Choose to redefine cpu_has_fpu to solve the problem.

 arch/mips/include/asm/cpu-features.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h
index de8cb2ccb781..38eb469008b6 100644
--- a/arch/mips/include/asm/cpu-features.h
+++ b/arch/mips/include/asm/cpu-features.h
@@ -134,6 +134,10 @@
 # endif
 #else
 # define raw_cpu_has_fpu	cpu_has_fpu
+# ifndef CONFIG_MIPS_FP_SUPPORT
+#  undef cpu_has_fpu
+#  define cpu_has_fpu		0
+# endif
 #endif
 #ifndef cpu_has_32fpr
 #define cpu_has_32fpr		__isa_ge_or_opt(1, MIPS_CPU_32FPR)
-- 
2.30.2


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

end of thread, other threads:[~2022-05-01 11:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29  3:26 [PATCH v2] MIPS: undefine and redefine cpu_has_fpu when it is overrided Stephen Zhang
2022-04-29  9:19 ` Maciej W. Rozycki
2022-04-29  9:51 ` Thomas Bogendoerfer
2022-04-29 15:11   ` Maciej W. Rozycki
2022-04-30  3:36     ` Stephen Zhang
2022-04-30 15:38       ` Maciej W. Rozycki
2022-05-01  2:54         ` Stephen Zhang
2022-05-01 11:31           ` Maciej W. Rozycki

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