lkml.org 
[lkml]   [2022]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] arch/mips/kernel/traps: add CONFIG_MIPS_FP_SUPPORT when using handle_fpe
Date
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
\
 
 \ /
  Last update: 2022-04-26 10:53    [W:2.011 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site