[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220429032621.674865-1-starzhangzsd@gmail.com>
Date: Fri, 29 Apr 2022 11:26:21 +0800
From: Stephen Zhang <starzhangzsd@...il.com>
To: tsbogend@...ha.franken.de, liam.howlett@...cle.com,
ebiederm@...ssion.com, dbueso@...e.de, alobakin@...me,
f.fainelli@...il.com, paul@...pouillou.net, linux@...ck-us.net,
anemo@....ocn.ne.jp
Cc: zhangshida@...inos.cn, starzhangzsd@...il.com,
linux-kernel@...r.kernel.org, linux-mips@...r.kernel.org,
"Maciej W . Rozycki" <macro@...am.me.uk>
Subject: [PATCH v2] MIPS: undefine and redefine cpu_has_fpu when it is overrided
From: Shida Zhang <zhangshida@...inos.cn>
Undefine and redefine cpu_has_fpu to 0 when it is overridden with
the "nofpu" option.
Suggested-by: Maciej W. Rozycki <macro@...am.me.uk>
Signed-off-by: Shida Zhang <zhangshida@...inos.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
Powered by blists - more mailing lists