ARM: 5909/1: ARM: Correct the FPSCR bits setting when raising exceptions

Commit c98929c07a removed the clearing of the FPSCR[31:28] bits from the
vfp_raise_exceptions() function and the new bits are or'ed with the old
FPSCR bits leading to unexpected results (the original commit was
referring to the cumulative bits - FPSCR[4:0]).

Reported-by: Tom Hameenanttila <tmhameen@marvell.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by Catalin Marinas and committed by Russell King dbead405 c540b9ff

+4 -1
+4 -1
arch/arm/vfp/vfpmodule.c
··· 197 197 } 198 198 199 199 /* 200 - * Update the FPSCR with the additional exception flags. 200 + * If any of the status flags are set, update the FPSCR. 201 201 * Comparison instructions always return at least one of 202 202 * these flags set. 203 203 */ 204 + if (exceptions & (FPSCR_N|FPSCR_Z|FPSCR_C|FPSCR_V)) 205 + fpscr &= ~(FPSCR_N|FPSCR_Z|FPSCR_C|FPSCR_V); 206 + 204 207 fpscr |= exceptions; 205 208 206 209 fmxr(FPSCR, fpscr);