]> git.karo-electronics.de Git - linux-beck.git/commit
ARM: 7400/1: vfp: clear fpscr length and stride bits on entry to sig handler
authorWill Deacon <will.deacon@arm.com>
Mon, 23 Apr 2012 14:42:16 +0000 (15:42 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 23 Apr 2012 14:44:42 +0000 (15:44 +0100)
commitff9a184cfb6542bef98aff1789481284e122a4b3
treeb531cd04c0bf9cc27806b4447260fa19360ec468
parent2498814fcb3068f19b82b1519b4038721f61af43
ARM: 7400/1: vfp: clear fpscr length and stride bits on entry to sig handler

The ARM PCS mandates that the length and stride bits of the fpscr are
cleared on entry to and return from a public interface. Although signal
handlers run asynchronously with respect to the interrupted function,
the handler itself expects to run as though it has been called like a
normal function.

This patch updates the state mirroring the VFP hardware before entry to
a signal handler so that it adheres to the PCS. Furthermore, we disable
VFP to ensure that we trap on any floating point operation performed by
the signal handler and synchronise the hardware appropriately. A check
is inserted after the signal handler to avoid redundant flushing if VFP
was not used.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/vfp/vfpmodule.c