[PATCH] arch/mips/kernel/traps: add CONFIG_MIPS_FP_SUPPORT when using handle_fpe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Shida Zhang <zhangshida@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 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




[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux