summaryrefslogtreecommitdiffstats
path: root/arch/arm/vfp/vfpmodule.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2015-04-18 01:53:58 +0200
committerFlorian Fainelli <f.fainelli@gmail.com>2015-05-21 00:07:00 +0200
commit7d7d7a413c5b8dddfde56dce1dd42e2199033c6c (patch)
treed0cec5573426b6bdde46df0eb850a8e487e09096 /arch/arm/vfp/vfpmodule.c
parentARM: vfp: Add include guards (diff)
downloadlinux-7d7d7a413c5b8dddfde56dce1dd42e2199033c6c.tar.xz
linux-7d7d7a413c5b8dddfde56dce1dd42e2199033c6c.zip
ARM: vfp: Add vfp_disable for problematic platforms
Some platforms might not be able to fully utilize VFP when e.g: one CPU out of two in a SMP complex lacks a VFP unit. Adding code to migrate task to the CPU which has a VFP unit would be cumbersome and not performant, instead, just add the ability to disable VFP. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Diffstat (limited to 'arch/arm/vfp/vfpmodule.c')
-rw-r--r--arch/arm/vfp/vfpmodule.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index f6e4d56eda00..2a61e4b04600 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -445,6 +445,19 @@ static void vfp_enable(void *unused)
set_copro_access(access | CPACC_FULL(10) | CPACC_FULL(11));
}
+/* Called by platforms on which we want to disable VFP because it may not be
+ * present on all CPUs within a SMP complex. Needs to be called prior to
+ * vfp_init().
+ */
+void vfp_disable(void)
+{
+ if (VFP_arch) {
+ pr_debug("%s: should be called prior to vfp_init\n", __func__);
+ return;
+ }
+ VFP_arch = 1;
+}
+
#ifdef CONFIG_CPU_PM
static int vfp_pm_suspend(void)
{