aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mvebu/platsmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mvebu/platsmp.c')
-rw-r--r--arch/arm/mach-mvebu/platsmp.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c
index 875ea748391c..93f2f3ab45f1 100644
--- a/arch/arm/mach-mvebu/platsmp.c
+++ b/arch/arm/mach-mvebu/platsmp.c
@@ -88,8 +88,16 @@ static int __cpuinit armada_xp_boot_secondary(unsigned int cpu,
88 88
89static void __init armada_xp_smp_init_cpus(void) 89static void __init armada_xp_smp_init_cpus(void)
90{ 90{
91 struct device_node *np;
91 unsigned int i, ncores; 92 unsigned int i, ncores;
92 ncores = coherency_get_cpu_count(); 93
94 np = of_find_node_by_name(NULL, "cpus");
95 if (!np)
96 panic("No 'cpus' node found\n");
97
98 ncores = of_get_child_count(np);
99 if (ncores == 0 || ncores > ARMADA_XP_MAX_CPUS)
100 panic("Invalid number of CPUs in DT\n");
93 101
94 /* Limit possible CPUs to defconfig */ 102 /* Limit possible CPUs to defconfig */
95 if (ncores > nr_cpu_ids) { 103 if (ncores > nr_cpu_ids) {