@@ -17,6 +17,7 @@
#include <asm/mcpm.h>
#include <asm/smp_scu.h>
+#include <asm/virt.h>
#include <asm/mach/map.h>
#include <plat/platsmp.h>
@@ -29,11 +30,14 @@ bool __init vexpress_smp_init_ops(void)
/*
* The best way to detect a multi-cluster configuration at the moment
* is to look for the presence of a CCI in the system.
- * Override the default vexpress_smp_ops if so.
+ * Override the default vexpress_smp_ops if so, but only if
+ * the kernel is not booted from HYP mode (which indicates
+ * that we're running in non-secure mode, where the CCI is not
+ * accessible).
*/
struct device_node *node;
node = of_find_compatible_node(NULL, NULL, "arm,cci-400");
- if (node && of_device_is_available(node)) {
+ if (node && of_device_is_available(node) && !is_hyp_mode_available()) {
mcpm_smp_set_ops();
return true;
}
Using MCPM implies being able to tweak the CCI at runtime, which is impossible to do when running non-secure. Since HYP implies running non-secure, let's not enable MCPM in that case. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> --- arch/arm/mach-vexpress/platsmp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)