diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2007-06-10 12:22:20 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-06-10 12:22:20 +0100 |
commit | 5d4cae5fe2ea1a0974962e2c49dca5c9c4b14cc0 (patch) | |
tree | 4f041d48181445ef55b1fedea7853d4fb2ef8f31 /arch/arm/vfp/vfpmodule.c | |
parent | 845a2fdcbd5bc5b9f652201ee95c825827a1d521 (diff) |
[ARM] VFP: fix section mismatch error
Fix a real section mismatch issue; the test code is thrown away after
initialisation, but if we do not detect the VFP hardware, it is left
hooked into the exception handler. Any VFP instructions which are
subsequently executed risk calling the discarded exception handler.
Introduce a new "null" handler which returns to the "unrecognised
fault" return address.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/vfp/vfpmodule.c')
-rw-r--r-- | arch/arm/vfp/vfpmodule.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index f1e5951dc72..1106b5f9cf1 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -26,8 +26,9 @@ */ void vfp_testing_entry(void); void vfp_support_entry(void); +void vfp_null_entry(void); -void (*vfp_vector)(void) = vfp_testing_entry; +void (*vfp_vector)(void) = vfp_null_entry; union vfp_state *last_VFP_context[NR_CPUS]; /* @@ -321,8 +322,10 @@ static int __init vfp_init(void) * The handler is already setup to just log calls, so * we just need to read the VFPSID register. */ + vfp_vector = vfp_testing_entry; vfpsid = fmrx(FPSID); barrier(); + vfp_vector = vfp_null_entry; printk(KERN_INFO "VFP support v0.3: "); if (VFP_arch) { |