summaryrefslogtreecommitdiff
path: root/arch/arm/vfp
diff options
context:
space:
mode:
authorHyungwoo Yang <hyungwooy@nvidia.com>2012-04-20 10:10:57 -0700
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-04-25 08:51:35 -0700
commit68667feb8eae225f1293a7044c989ab0bba8dbd1 (patch)
tree7e52509f3c206838db3bed79256c57c521f5d9f0 /arch/arm/vfp
parent077c1bf346608626a5573313a041b0e86f58f0b6 (diff)
ARM: vfp: Prevent process migration
System crashes if there is process migration during vfp_init() call. During vfp_init(), if a process which called vfp_enable() is migrated just after the call, then the process executing the rest of code will access a VFP unit which is not ENABLED and also smp_call_function() will not work as it is expected. This patch prevents process migration during vfp_init(). Bug 968524 Bug 961609 Bug 957974 Bug 958581 Bug 959838 Bug 946739 Change-Id: I18c0ff3af490578afd5add7a1d64cab8c8ebf487 Signed-off-by: Hyungwoo Yang <hyungwooy@nvidia.com> Reviewed-on: http://git-master/r/98029 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Karan Jhavar <kjhavar@nvidia.com> Reviewed-by: Thomas Cherry <tcherry@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch/arm/vfp')
-rw-r--r--arch/arm/vfp/vfpmodule.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index e381dc68505d..6a46b56f7538 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -574,6 +574,9 @@ static int __init vfp_init(void)
unsigned int vfpsid;
unsigned int cpu_arch = cpu_architecture();
+#ifdef CONFIG_SMP
+ preempt_disable();
+#endif
if (cpu_arch >= CPU_ARCH_ARMv6)
vfp_enable(NULL);
@@ -644,6 +647,9 @@ static int __init vfp_init(void)
elf_hwcap |= HWCAP_VFPv4;
}
}
+#ifdef CONFIG_SMP
+ preempt_enable();
+#endif
return 0;
}