]> 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)
commit60b6225d9cdcde528427de7b235bbf8f6b16ce61
treeb531cd04c0bf9cc27806b4447260fa19360ec468
parent94e3ad7230c642c4cc54fc11b2554ea58fd9c3f1
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