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

[Xen-devel] [RFC PATCH 15/31] xen/arm: Store device-tree node per cpu



From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
CC: Julien Grall <julien.grall@xxxxxxxxxx>
---
 xen/arch/arm/smpboot.c        | 5 +++++
 xen/include/xen/device_tree.h | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index 32e8722..caa126e 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -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);
diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h
index 7e51a7a..98933f7 100644
--- a/xen/include/xen/device_tree.h
+++ b/xen/include/xen/device_tree.h
@@ -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)
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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