@@ -39,6 +39,7 @@ cpumask_t cpu_present_map;
cpumask_t cpu_possible_map;
struct cpuinfo_arm cpu_data[NR_CPUS];
+struct dt_device_node *cpu_dt_nodes[NR_CPUS];
/* CPU logical map: map xen cpuid to an MPIDR */
register_t __cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = MPIDR_INVALID };
@@ -110,6 +111,8 @@ static void __init dt_smp_init_cpus(void)
mpidr = boot_cpu_data.mpidr.bits & MPIDR_HWID_MASK;
+ memset(cpu_dt_nodes, 0, sizeof(cpu_dt_nodes));
+
if ( !cpus )
{
printk(XENLOG_WARNING "WARNING: Can't find /cpus in the device tree.\n"
@@ -211,6 +214,8 @@ static void __init dt_smp_init_cpus(void)
break;
}
+ cpu_dt_nodes[i] = cpu;
+
if ( (rc = arch_cpu_init(i, cpu)) < 0 )
{
printk("cpu%d init failed (hwid %"PRIregister"): %d\n", i, hwid, rc);
@@ -920,6 +920,8 @@ int dt_count_phandle_with_args(const struct dt_device_node *np,
const char *list_name,
const char *cells_name);
+extern struct dt_device_node *cpu_dt_nodes[];
+
#ifdef CONFIG_DEVICE_TREE_DEBUG
#define dt_dprintk(fmt, args...) \
printk(XENLOG_DEBUG fmt, ## args)