[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220426083259.526685-1-starzhangzsd@gmail.com>
Date: Tue, 26 Apr 2022 16:32:59 +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
Cc: zhangshida@...inos.cn, starzhangzsd@...il.com,
linux-kernel@...r.kernel.org, linux-mips@...r.kernel.org
Subject: [PATCH] arch/mips/kernel/traps: add CONFIG_MIPS_FP_SUPPORT when using handle_fpe
From: Shida Zhang <zhangshida@...inos.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@...inos.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
Powered by blists - more mailing lists