]> git.baikalelectronics.ru Git - kernel.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)
commit422f8be19a2e0ad5a1c913c4d6dd2b059e12c443
treeb531cd04c0bf9cc27806b4447260fa19360ec468
parent830ad7e8d9d9679797ed886fb2b85faf8ff7182e
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