linux/arch/arm/vfp
Russell King 15ac49b650 ARM: Fix undefined instruction exception handling
While trying to get a v3.5 kernel booted on the cubox, I noticed that
VFP does not work correctly with VFP bounce handling.  This is because
of the confusion over 16-bit vs 32-bit instructions, and where PC is
supposed to point to.

The rule is that FP handlers are entered with regs->ARM_pc pointing at
the _next_ instruction to be executed.  However, if the exception is
not handled, regs->ARM_pc points at the faulting instruction.

This is easy for ARM mode, because we know that the next instruction and
previous instructions are separated by four bytes.  This is not true of
Thumb2 though.

Since all FP instructions are 32-bit in Thumb2, it makes things easy.
We just need to select the appropriate adjustment.  Do this by moving
the adjustment out of do_undefinstr() into the assembly code, as only
the assembly code knows whether it's dealing with a 32-bit or 16-bit
instruction.

Cc: <stable@vger.kernel.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-07-31 12:04:30 +01:00
..
entry.S ARM: Fix undefined instruction exception handling 2012-07-31 12:04:30 +01:00
Makefile ARM: vfp: use -mfloat-abi=soft to build vfp 2011-10-01 21:08:55 +02:00
vfp.h [ARM] 5387/1: Add ptrace VFP support on ARM 2009-02-12 10:59:43 +00:00
vfpdouble.c [ARM] vfp: fix fuitod/fsitod instructions 2008-01-10 17:07:08 +00:00
vfphw.S ARM: Fix undefined instruction exception handling 2012-07-31 12:04:30 +01:00
vfpinstr.h [ARM] 4583/1: ARMv7: Add VFPv3 support 2008-01-26 14:41:28 +00:00
vfpmodule.c ARM: 7477/1: vfp: Always save VFP state in vfp_pm_suspend on UP 2012-07-31 10:30:43 +01:00
vfpsingle.c [ARM] Remove unnecessary asm/ptrace.h from VFP support code 2007-04-22 10:56:40 +01:00