diff options
author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2014-04-21 19:25:35 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-04-22 17:23:59 -0400 |
commit | 4530e4b6a450af14973c2b0703edfb02d66cbd41 (patch) | |
tree | 20ad0784be6feed9e2869a0961e468d82bfe333c /arch/arm/include/asm/mcpm.h | |
parent | 56b700fd6f1e49149880fb1b6ffee0dca5be45fb (diff) |
ARM: 8032/1: bL_switcher: fix validation check before its activation
The switcher should not depend on MAX_CLUSTER to determine ifit should
be activated or not. In a multiplatform kernel binary it is possible to
have dual-cluster and quad-cluster platforms configured in. In that case
MAX_CLUSTER which is a build time limit should be 4 and that shouldn't
prevent the switcher from working if the kernel is booted on a b.L
dual-cluster system.
In bL_switcher_halve_cpus() we already have a runtime validation check
to make sure we're dealing with only two clusters, so booting on a quad
cluster system will be caught and switcher activation aborted.
However, the b.L switcher must ensure the MCPM layer is initialized on
the booted hardware before doing anything. The mcpm_is_available()
function is added to that effect.
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Abhilash Kesavan <kesavan.abhilash@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/mcpm.h')
-rw-r--r-- | arch/arm/include/asm/mcpm.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/include/asm/mcpm.h b/arch/arm/include/asm/mcpm.h index 608516ebabfe..a5ff410dcdb6 100644 --- a/arch/arm/include/asm/mcpm.h +++ b/arch/arm/include/asm/mcpm.h | |||
@@ -54,6 +54,13 @@ void mcpm_set_early_poke(unsigned cpu, unsigned cluster, | |||
54 | */ | 54 | */ |
55 | 55 | ||
56 | /** | 56 | /** |
57 | * mcpm_is_available - returns whether MCPM is initialized and available | ||
58 | * | ||
59 | * This returns true or false accordingly. | ||
60 | */ | ||
61 | bool mcpm_is_available(void); | ||
62 | |||
63 | /** | ||
57 | * mcpm_cpu_power_up - make given CPU in given cluster runable | 64 | * mcpm_cpu_power_up - make given CPU in given cluster runable |
58 | * | 65 | * |
59 | * @cpu: CPU number within given cluster | 66 | * @cpu: CPU number within given cluster |