summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2014-02-07 05:35:02 +0100
committerStephen Warren <swarren@nvidia.com>2014-02-18 21:46:32 +0100
commitc3af6d68550c50597be25f29bc1cb742c10c63c0 (patch)
tree79b537cbcb895f0818a4b85adf52fe4360fe5504
parentARM: trusted_foundations: fix vendor prefix typos (diff)
downloadlinux-c3af6d68550c50597be25f29bc1cb742c10c63c0.tar.xz
linux-c3af6d68550c50597be25f29bc1cb742c10c63c0.zip
ARM: trusted_foundations: fallback when TF support is missing
When Trusted Foundations is detected as present on the system, but Trusted Foundations support is not built into the kernel, the kernel used to issue a panic very early during boot, leaving little clue to the user as to what is going wrong. It turns out that even without TF support built-in, the kernel can boot on a TF-enabled system provided that SMP and cpuidle are disabled. This patch does this and continue booting on one CPU, leaving the user with a usable (however degraded) system. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Stephen Warren <swarren@nvidia.com>
-rw-r--r--arch/arm/include/asm/trusted_foundations.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/include/asm/trusted_foundations.h b/arch/arm/include/asm/trusted_foundations.h
index 997862fd5d77..b5f7705abcb0 100644
--- a/arch/arm/include/asm/trusted_foundations.h
+++ b/arch/arm/include/asm/trusted_foundations.h
@@ -30,6 +30,8 @@
#include <linux/printk.h>
#include <linux/bug.h>
#include <linux/of.h>
+#include <linux/cpu.h>
+#include <linux/smp.h>
struct trusted_foundations_platform_data {
unsigned int version_major;
@@ -47,10 +49,13 @@ static inline void register_trusted_foundations(
struct trusted_foundations_platform_data *pd)
{
/*
- * If we try to register TF, this means the system needs it to continue.
- * Its absence if thus a fatal error.
+ * If the system requires TF and we cannot provide it, continue booting
+ * but disable features that cannot be provided.
*/
- panic("No support for Trusted Foundations, stopping...\n");
+ pr_err("No support for Trusted Foundations, continuing in degraded mode.\n");
+ pr_err("Secondary processors as well as CPU PM will be disabled.\n");
+ setup_max_cpus = 0;
+ cpu_idle_poll_ctrl(true);
}
static inline void of_register_trusted_foundations(void)