aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/arm/setup.c
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2012-11-19 12:59:46 +0000
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2012-11-19 12:59:46 +0000
commit2ac19a6b381c9a9cd57afc107af95761bbddb5e0 (patch)
tree8d77dcf094bf9fee96fe09d6737040fc38ce1a89 /xen/arch/arm/setup.c
parenta8c81103334f89bf3bfc051201e4b5717a014d4d (diff)
downloadxen-2ac19a6b381c9a9cd57afc107af95761bbddb5e0.tar.gz
xen-2ac19a6b381c9a9cd57afc107af95761bbddb5e0.tar.bz2
xen-2ac19a6b381c9a9cd57afc107af95761bbddb5e0.zip
xen/arm: get the number of cpus from device tree
The system might have fewer cpus than the GIC supports. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/arch/arm/setup.c')
-rw-r--r--xen/arch/arm/setup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 0328394179..c52330ee84 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -185,10 +185,13 @@ void __init start_xen(unsigned long boot_phys_offset,
size_t fdt_size;
int cpus, i;
+ smp_clear_cpu_maps();
+
fdt = (void *)BOOT_MISC_VIRT_START
+ (atag_paddr & ((1 << SECOND_SHIFT) - 1));
fdt_size = device_tree_early_init(fdt);
+ cpus = smp_get_max_cpus();
cmdline_parse(device_tree_bootargs(fdt));
setup_pagetables(boot_phys_offset, get_xen_paddr());
@@ -199,7 +202,7 @@ void __init start_xen(unsigned long boot_phys_offset,
console_init_preirq();
#endif
- cpus = gic_init();
+ gic_init();
make_cpus_ready(cpus, boot_phys_offset);
percpu_init_areas();