arm: introduce psci_smp_ops
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / arm / kernel / setup.c
index 1522c7a..8f7a6e9 100644 (file)
@@ -37,6 +37,7 @@
 #include <asm/cputype.h>
 #include <asm/elf.h>
 #include <asm/procinfo.h>
+#include <asm/psci.h>
 #include <asm/sections.h>
 #include <asm/setup.h>
 #include <asm/smp_plat.h>
@@ -796,9 +797,13 @@ void __init setup_arch(char **cmdline_p)
        unflatten_device_tree();
 
        arm_dt_init_cpu_maps();
+       psci_init();
 #ifdef CONFIG_SMP
        if (is_smp()) {
-               smp_set_ops(mdesc->smp);
+               if (psci_smp_available())
+                       smp_set_ops(&psci_smp_ops);
+               else if (mdesc->smp)
+                       smp_set_ops(mdesc->smp);
                smp_init_cpus();
        }
 #endif