[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] arm64: enable PSCI secondary CPU bringup



commit d65da94e03935878d84818a6890403997027cfa4
Author:     Andre Przywara <andre.przywara@xxxxxxxxxx>
AuthorDate: Thu Dec 5 11:08:12 2013 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Thu Dec 5 12:25:19 2013 +0000

    arm64: enable PSCI secondary CPU bringup
    
    If the device tree contains a PSCI node and the DTB CPU node tells us
    to use PSCI for enabling secondary cores, we set the function pointer
    to the PSCI wrapper function to enable PSCI SMP bringup.
    
    Signed-off-by: Andre Przywara <andre.przywara@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 xen/arch/arm/arm64/smpboot.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/xen/arch/arm/arm64/smpboot.c b/xen/arch/arm/arm64/smpboot.c
index 6a34bd4..1287c72 100644
--- a/xen/arch/arm/arm64/smpboot.c
+++ b/xen/arch/arm/arm64/smpboot.c
@@ -6,6 +6,7 @@
 #include <xen/smp.h>
 #include <xen/vmap.h>
 #include <asm/io.h>
+#include <asm/psci.h>
 
 struct smp_enable_ops {
         int             (*prepare_cpu)(int);
@@ -52,6 +53,18 @@ static void __init smp_spin_table_init(int cpu, struct 
dt_device_node *dn)
     smp_enable_ops[cpu].prepare_cpu = smp_spin_table_cpu_up;
 }
 
+static int __init smp_psci_init(int cpu)
+{
+    if ( !psci_available )
+    {
+        printk("CPU%d asks for PSCI, but DTB has no PSCI node\n", cpu);
+        return -ENODEV;
+    }
+
+    smp_enable_ops[cpu].prepare_cpu = call_psci_cpu_on;
+    return 0;
+}
+
 int __init arch_smp_init(void)
 {
     /* Nothing */
@@ -71,7 +84,8 @@ int __init arch_cpu_init(int cpu, struct dt_device_node *dn)
 
     if ( !strcmp(enable_method, "spin-table") )
         smp_spin_table_init(cpu, dn);
-    /* TODO: method "psci" */
+    else if ( !strcmp(enable_method, "psci") )
+        return smp_psci_init(cpu);
     else
     {
         printk("CPU%d has unknown enable method \"%s\"\n", cpu, enable_method);
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.