diff options
author | Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> | 2013-07-23 13:32:42 +0200 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2013-08-09 15:02:51 +0200 |
commit | a7160b7eaf2d914e1b552807b9d13acf23b47293 (patch) | |
tree | 67169749cf60bd10da936efb44fd4dad0ca3de65 /arch/arm/mach-mvebu/platsmp.c | |
parent | Linux 3.11-rc1 (diff) | |
download | linux-a7160b7eaf2d914e1b552807b9d13acf23b47293.tar.xz linux-a7160b7eaf2d914e1b552807b9d13acf23b47293.zip |
ARM: mach-mvebu: remove redundant DT parsing and validation
arm_dt_init_cpu_maps parses the device tree, validates and sets the
cpu_possible_mask appropriately. It is unnecessary to do another DT
parse to get the number of cpus, use num_possible_cpus instead.
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Acked-by: Gregory Clement <gregory.clement@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/mach-mvebu/platsmp.c')
-rw-r--r-- | arch/arm/mach-mvebu/platsmp.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c index 93f2f3ab45f1..9ccbbdb89a4d 100644 --- a/arch/arm/mach-mvebu/platsmp.c +++ b/arch/arm/mach-mvebu/platsmp.c @@ -88,28 +88,11 @@ static int __cpuinit armada_xp_boot_secondary(unsigned int cpu, static void __init armada_xp_smp_init_cpus(void) { - struct device_node *np; - unsigned int i, ncores; + unsigned int ncores = num_possible_cpus(); - np = of_find_node_by_name(NULL, "cpus"); - if (!np) - panic("No 'cpus' node found\n"); - - ncores = of_get_child_count(np); if (ncores == 0 || ncores > ARMADA_XP_MAX_CPUS) panic("Invalid number of CPUs in DT\n"); - /* Limit possible CPUs to defconfig */ - if (ncores > nr_cpu_ids) { - pr_warn("SMP: %d CPUs physically present. Only %d configured.", - ncores, nr_cpu_ids); - pr_warn("Clipping CPU count to %d\n", nr_cpu_ids); - ncores = nr_cpu_ids; - } - - for (i = 0; i < ncores; i++) - set_cpu_possible(i, true); - set_smp_cross_call(armada_mpic_send_doorbell); } |