aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common
diff options
context:
space:
mode:
authorJulien Grall <julien.grall@linaro.org>2013-09-26 12:09:40 +0100
committerIan Campbell <ian.campbell@citrix.com>2013-09-26 15:44:58 +0100
commitff9b41bb347b08114dd89cdc8e45bfc1d1b12511 (patch)
tree54b381b51d24a8303c3b129542816e5f75ffb1e2 /xen/common
parenta22a8e48eee4d1157eeef2b9c1b81ef9124dda4e (diff)
downloadxen-ff9b41bb347b08114dd89cdc8e45bfc1d1b12511.tar.gz
xen-ff9b41bb347b08114dd89cdc8e45bfc1d1b12511.tar.bz2
xen-ff9b41bb347b08114dd89cdc8e45bfc1d1b12511.zip
xen/arm: Dissociate logical and hardware CPU ID
Introduce cpu_logical_map to associate a logical CPU ID to an hardware CPU ID. This map will be filled during Xen boot via the device tree. Each CPU node contains a "reg" property which contains the hardware ID (ie MPIDR[0:23]). Also move /cpus parsing later so we can use the dt_* API. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/common')
-rw-r--r--xen/common/device_tree.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index 0ece2499ad..9a16650ee1 100644
--- a/xen/common/device_tree.c
+++ b/xen/common/device_tree.c
@@ -118,18 +118,6 @@ static bool_t __init device_tree_node_matches(const void *fdt, int node,
&& (name[match_len] == '@' || name[match_len] == '\0');
}
-static bool_t __init device_tree_type_matches(const void *fdt, int node,
- const char *match)
-{
- const void *prop;
-
- prop = fdt_getprop(fdt, node, "device_type", NULL);
- if ( prop == NULL )
- return 0;
-
- return !dt_node_cmp(prop, match);
-}
-
static bool_t __init device_tree_node_compatible(const void *fdt, int node,
const char *match)
{
@@ -348,40 +336,6 @@ static void __init process_memory_node(const void *fdt, int node,
}
}
-static void __init process_cpu_node(const void *fdt, int node,
- const char *name,
- u32 address_cells, u32 size_cells)
-{
- const struct fdt_property *prop;
- u32 cpuid;
- int len;
-
- prop = fdt_get_property(fdt, node, "reg", &len);
- if ( !prop )
- {
- early_printk("fdt: node `%s': missing `reg' property\n", name);
- return;
- }
-
- if ( len < sizeof (cpuid) )
- {
- dt_printk("fdt: node `%s': `reg` property length is too short\n",
- name);
- return;
- }
-
- cpuid = dt_read_number((const __be32 *)prop->data, 1);
-
- /* TODO: handle non-contiguous CPU ID */
- if ( cpuid >= NR_CPUS )
- {
- dt_printk("fdt: node `%s': reg(0x%x) >= NR_CPUS(%d)\n",
- name, cpuid, NR_CPUS);
- return;
- }
- cpumask_set_cpu(cpuid, &cpu_possible_map);
-}
-
static void __init process_multiboot_node(const void *fdt, int node,
const char *name,
u32 address_cells, u32 size_cells)
@@ -435,8 +389,6 @@ static int __init early_scan_node(const void *fdt,
{
if ( device_tree_node_matches(fdt, node, "memory") )
process_memory_node(fdt, node, name, address_cells, size_cells);
- else if ( device_tree_type_matches(fdt, node, "cpu") )
- process_cpu_node(fdt, node, name, address_cells, size_cells);
else if ( device_tree_node_compatible(fdt, node, "xen,multiboot-module" ) )
process_multiboot_node(fdt, node, name, address_cells, size_cells);