Skip to content

Commit

Permalink
sh: Fix SH-X3 FPU exception handling.
Browse files Browse the repository at this point in the history
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 <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Aug 1, 2007
1 parent 06f862c commit e0a3647
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/sh/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e0a3647

Please sign in to comment.