From: Paul Mundt Date: Wed, 1 Aug 2007 07:55:07 +0000 (+0900) Subject: sh: Fix SH-X3 FPU exception handling. X-Git-Tag: v2.6.23-rc2~5^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0a3647fd7729bee1ed9667ce5d8eb88f0604138;p=linux-2.6 sh: Fix SH-X3 FPU exception handling. SH-X3 has the FPU exceptions on different vectors completely, patch in do_fpu_state_restore() to the proper vectors. Results in a much happier userspace. Signed-off-by: Paul Mundt --- diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c index 502d43e478..67015044d7 100644 --- a/arch/sh/kernel/traps.c +++ b/arch/sh/kernel/traps.c @@ -854,9 +854,14 @@ void __init trap_init(void) set_exception_table_evt(0x800, do_reserved_inst); set_exception_table_evt(0x820, do_illegal_slot_inst); #elif defined(CONFIG_SH_FPU) +#ifdef CONFIG_CPU_SUBTYPE_SHX3 + set_exception_table_evt(0xd80, do_fpu_state_restore); + set_exception_table_evt(0xda0, do_fpu_state_restore); +#else set_exception_table_evt(0x800, do_fpu_state_restore); set_exception_table_evt(0x820, do_fpu_state_restore); #endif +#endif #ifdef CONFIG_CPU_SH2 set_exception_table_vec(TRAP_ADDRESS_ERROR, address_error_handler);