Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] arch/mips/kernel/traps: add CONFIG_MIPS_FP_SUPPORT when using handle_fpe
@ 2022-04-26  8:32 Stephen Zhang
  2022-04-27  0:40 ` Maciej W. Rozycki
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Zhang @ 2022-04-26  8:32 UTC (permalink / raw)
  To: tsbogend, liam.howlett, ebiederm, dbueso, alobakin, f.fainelli
  Cc: zhangshida, starzhangzsd, linux-kernel, linux-mips

From: Shida Zhang <zhangshida@kylinos.cn>

handle_fpe gets defined when CONFIG_MIPS_FP_SUPPORT is defined. So add
CONFIG_MIPS_FP_SUPPORT when using handle_fpe.

Signed-off-by: Shida Zhang <zhangshida@kylinos.cn>
---
 arch/mips/kernel/traps.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 246c6a6b0261..ef9792261f91 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -90,7 +90,9 @@ extern asmlinkage void handle_cpu(void);
 extern asmlinkage void handle_ov(void);
 extern asmlinkage void handle_tr(void);
 extern asmlinkage void handle_msa_fpe(void);
+#ifdef CONFIG_MIPS_FP_SUPPORT
 extern asmlinkage void handle_fpe(void);
+#endif
 extern asmlinkage void handle_ftlb(void);
 extern asmlinkage void handle_gsexc(void);
 extern asmlinkage void handle_msa(void);
@@ -2489,8 +2491,10 @@ void __init trap_init(void)
 	if (board_nmi_handler_setup)
 		board_nmi_handler_setup();
 
+#ifdef CONFIG_MIPS_FP_SUPPORT
 	if (cpu_has_fpu && !cpu_has_nofpuex)
 		set_except_vector(EXCCODE_FPE, handle_fpe);
+#endif
 
 	if (cpu_has_ftlbparex)
 		set_except_vector(MIPS_EXCCODE_TLBPAR, handle_ftlb);
-- 
2.30.2


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

end of thread, other threads:[~2022-04-29  3:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-26  8:32 [PATCH] arch/mips/kernel/traps: add CONFIG_MIPS_FP_SUPPORT when using handle_fpe Stephen Zhang
2022-04-27  0:40 ` Maciej W. Rozycki
2022-04-27  1:57   ` Stephen Zhang
2022-04-27 10:57     ` Maciej W. Rozycki
     [not found]       ` <CANubcdUPQJcJ=dryJGsnQLhjcTouLUARD-GwCd7UjurUm+-GXg@mail.gmail.com>
2022-04-28  9:00         ` Maciej W. Rozycki
2022-04-29  3:10           ` Stephen Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox