@@ -70,7 +70,7 @@ int __init arch_smp_init(void)
return 0;
}
-int __init arch_cpu_init(int cpu, struct dt_device_node *dn)
+static int __init dt_arch_cpu_init(int cpu, struct dt_device_node *dn)
{
const char *enable_method;
@@ -94,6 +94,11 @@ int __init arch_cpu_init(int cpu, struct dt_device_node *dn)
return 0;
}
+int __init arch_cpu_init(int cpu, struct dt_device_node *dn)
+{
+ return dt_arch_cpu_init(cpu, dn);
+}
+
int __init arch_cpu_up(int cpu)
{
if ( !smp_enable_ops[cpu].prepare_cpu )
@@ -92,7 +92,7 @@ smp_clear_cpu_maps (void)
* MPIDR values related to logical cpus
* Code base on Linux arch/arm/kernel/devtree.c
*/
-void __init smp_init_cpus(void)
+static void __init dt_smp_init_cpus(void)
{
register_t mpidr;
struct dt_device_node *cpus = dt_find_node_by_path("/cpus");
@@ -106,16 +106,6 @@ void __init smp_init_cpus(void)
bool_t bootcpu_valid = 0;
int rc;
- /* scan the DTB for a PSCI node and set a global variable */
- psci_init();
-
- if ( (rc = arch_smp_init()) < 0 )
- {
- printk(XENLOG_WARNING "SMP init failed (%d)\n"
- "Using only 1 CPU\n", rc);
- return;
- }
-
mpidr = boot_cpu_data.mpidr.bits & MPIDR_HWID_MASK;
if ( !cpus )
@@ -243,6 +233,23 @@ void __init smp_init_cpus(void)
}
}
+void __init smp_init_cpus(void)
+{
+ int rc;
+
+ /* initialize PSCI and set a global variable */
+ psci_init();
+
+ if ( (rc = arch_smp_init()) < 0 )
+ {
+ printk(XENLOG_WARNING "SMP init failed (%d)\n"
+ "Using only 1 CPU\n", rc);
+ return;
+ }
+
+ dt_smp_init_cpus();
+}
+
int __init
smp_get_max_cpus (void)
{