aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/vfp/vfpmodule.c
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-05-30 09:00:18 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2009-05-30 09:00:18 -0400
commit85d6943af50537d3aec58b967ffbd3fec88453e9 (patch)
tree2033d95a7a57f792856cc08e1bd77f01386c5ed6 /arch/arm/vfp/vfpmodule.c
parent26584853a44c58f3d6ac7360d697a2ddcd1a3efa (diff)
Fix the VFP handling on the Feroceon CPU
This CPU generates synchronous VFP exceptions in a non-standard way - the FPEXC.EX bit set but without the FPSCR.IXE bit being set like in the VFP subarchitecture 1 or just the FPEXC.DEX bit like in VFP subarchitecture 2. The main problem is that the faulty instruction (which needs to be emulated in software) will be restarted several times (normally until a context switch disables the VFP). This patch ensures that the VFP exception is treated as synchronous. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Nicolas Pitre <nico@cam.org>
Diffstat (limited to 'arch/arm/vfp/vfpmodule.c')
-rw-r--r--arch/arm/vfp/vfpmodule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 01599c4ef72..2d7423af119 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -253,12 +253,14 @@ void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs)
253 } 253 }
254 254
255 if (fpexc & FPEXC_EX) { 255 if (fpexc & FPEXC_EX) {
256#ifndef CONFIG_CPU_FEROCEON
256 /* 257 /*
257 * Asynchronous exception. The instruction is read from FPINST 258 * Asynchronous exception. The instruction is read from FPINST
258 * and the interrupted instruction has to be restarted. 259 * and the interrupted instruction has to be restarted.
259 */ 260 */
260 trigger = fmrx(FPINST); 261 trigger = fmrx(FPINST);
261 regs->ARM_pc -= 4; 262 regs->ARM_pc -= 4;
263#endif
262 } else if (!(fpexc & FPEXC_DEX)) { 264 } else if (!(fpexc & FPEXC_DEX)) {
263 /* 265 /*
264 * Illegal combination of bits. It can be caused by an 266 * Illegal combination of bits. It can be caused by an