arm32: enable PSCI secondary CPU bringup
authorAndre Przywara <andre.przywara@linaro.org>
Thu, 5 Dec 2013 10:08:11 +0000 (11:08 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 5 Dec 2013 12:25:16 +0000 (12:25 +0000)
If the device tree contains a PSCI node, we bring up secondary CPUs
by invoking the appropriate PSCI handler.
This will take priority over platform specific functions (which could
call the PSCI wrapper themselves if needed), so any PSCI enablement
of a platform will automatically be used (as on Linux).

Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/arm32/smpboot.c
xen/arch/arm/platform.c

index 88fe8fbebcb088d00e542efaa0bef9d4d097c8bc..2a77f29dfa019112988de3617a78e1f300948c73 100644 (file)
@@ -10,7 +10,9 @@ int __init arch_smp_init(void)
 
 int __init arch_cpu_init(int cpu, struct dt_device_node *dn)
 {
-    /* TODO handle PSCI init */
+    /* Not needed on ARM32, as there is no relevant information in
+     * the CPU device tree node for ARMv7 CPUs.
+     */
     return 0;
 }
 
index e13a354cd5a61238e0fdb6ec0569401c2801dd98..1122bbd976b75b2cc716bb15d18b2474513864b0 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/platform.h>
 #include <xen/device_tree.h>
 #include <xen/init.h>
+#include <asm/psci.h>
 
 extern const struct platform_desc _splatform[], _eplatform[];
 
@@ -109,6 +110,9 @@ int __init platform_specific_mapping(struct domain *d)
 #ifdef CONFIG_ARM_32
 int __init platform_cpu_up(int cpu)
 {
+    if ( psci_available )
+        return call_psci_cpu_on(cpu);
+
     if ( platform && platform->cpu_up )
         return platform->cpu_up(cpu);