diff options
author | Tzachi Perelstein <tzachi@marvell.com> | 2007-09-09 09:24:59 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-09-13 10:10:27 -0400 |
commit | b9338a78fc21e980d33c58b31f3bb37cd48a68f6 (patch) | |
tree | a70c8ce2b23ddc383f3908e71b1dfa1141363b88 /arch/arm/vfp | |
parent | a53d6fb83efc75bbd7876459e6e1291c4925103d (diff) |
[ARM] 4567/1: Fix 'Oops - undefined instruction' when CONFIG_VFP=y on non VFP device
vfp_init() takes care of the condition when CONFIG_VFP=y but no real VFP
device exists. However, when this condition is true, a compiler might
misplace code lines in a way that will break this support. (To be more
specific - fmrx(FPSID) might be executed before vfp_testing_entry
assignment, which will end up with Oops - undefined instruction).
This patch adds a barrier() to guarantee the right execution ordering.
Signed-off-by: Assaf Hoffman
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/vfp')
-rw-r--r-- | arch/arm/vfp/vfpmodule.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 04ddab2bd876..eea3f50743d5 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -323,6 +323,7 @@ static int __init vfp_init(void) | |||
323 | * we just need to read the VFPSID register. | 323 | * we just need to read the VFPSID register. |
324 | */ | 324 | */ |
325 | vfp_vector = vfp_testing_entry; | 325 | vfp_vector = vfp_testing_entry; |
326 | barrier(); | ||
326 | vfpsid = fmrx(FPSID); | 327 | vfpsid = fmrx(FPSID); |
327 | barrier(); | 328 | barrier(); |
328 | vfp_vector = vfp_null_entry; | 329 | vfp_vector = vfp_null_entry; |