diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2013-05-24 16:23:28 +0200 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2013-07-08 22:07:38 +0100 |
commit | ab3da15643469ab2d206dee3d9cfa4194ba77f25 (patch) | |
tree | e332a19c18476b01934d0d2b10551daac0abd5b6 /arch/arm/vfp/vfphw.S | |
parent | 0773d73d818702191dd568e1e20bcafc5c64661a (diff) | |
download | linux-stable-ab3da15643469ab2d206dee3d9cfa4194ba77f25.tar.gz linux-stable-ab3da15643469ab2d206dee3d9cfa4194ba77f25.tar.bz2 linux-stable-ab3da15643469ab2d206dee3d9cfa4194ba77f25.zip |
ARM: be strict about FP exceptions in kernel mode
The support code in vfp_support_entry does not care whether the
exception that caused it to be invoked occurred in kernel mode or
in user mode. However, neither condition that could trigger this
exception (lazy restore and VFP bounce to support code) is
currently allowable in kernel mode.
In either case, print a message describing the condition before
letting the undefined instruction handler run its course and trigger
an oops.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Diffstat (limited to 'arch/arm/vfp/vfphw.S')
-rw-r--r-- | arch/arm/vfp/vfphw.S | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S index 8d10dc8a1e17..3e5d3115a2a6 100644 --- a/arch/arm/vfp/vfphw.S +++ b/arch/arm/vfp/vfphw.S @@ -78,6 +78,11 @@ ENTRY(vfp_support_entry) DBGSTR3 "instr %08x pc %08x state %p", r0, r2, r10 + ldr r3, [sp, #S_PSR] @ Neither lazy restore nor FP exceptions + and r3, r3, #MODE_MASK @ are supported in kernel mode + teq r3, #USR_MODE + bne vfp_kmode_exception @ Returns through lr + VFPFMRX r1, FPEXC @ Is the VFP enabled? DBGSTR1 "fpexc %08x", r1 tst r1, #FPEXC_EN |