From: George G. Davis Date: Fri, 5 May 2006 21:32:23 +0000 (+0100) Subject: [ARM] 3499/1: Fix VFP FPSCR corruption for double exception case X-Git-Tag: v2.6.17-rc4~38 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7d7ef87e15dea105be59ec8f14e2f92182dd421;p=linux-2.6 [ARM] 3499/1: Fix VFP FPSCR corruption for double exception case Patch from George G. Davis The ARM VFP FPSCR register is corrupted when a condition flags modifying VFP instruction is followed by a non-condition flags modifying VFP instruction and both instructions raise exceptions. The fix is to read the current FPSCR in between emulation of these two instructions and use the current FPSCR value when handling the second exception. Signed-off-by: George G. Davis Signed-off-by: Russell King --- diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 37ff8145b5..03486be041 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -245,7 +245,7 @@ void VFP9_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs) */ barrier(); trigger = fmrx(FPINST2); - fpscr = fmrx(FPSCR); + orig_fpscr = fpscr = fmrx(FPSCR); emulate: exceptions = vfp_emulate_instruction(trigger, fpscr, regs);