mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
kernel/smp: Make the SMP boot message common on all arches
Currently after bringing up secondary CPUs all arches print "Brought up %d CPUs". On x86 they also print the number of nodes that were brought online. It would be nice to also print the number of nodes on other arches. Although we could override smp_announce() on the other ~10 NUMA aware arches, it seems simpler to just always print the number of nodes. On non-NUMA arches there is just always 1 node. Having done that, smp_announce() is no longer weak, and seems small enough to just pull directly into smp_init(). Also update the printing of "%d CPUs" to be smart when an SMP kernel is booted on a single CPU system, or when only one CPU is available, eg: smp: Brought up 2 nodes, 1 CPU Signed-off-by: Michael Ellerman <[email protected]> Reviewed-by: Borislav Petkov <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
ca7dfdbb33
commit
92b2327829
2 changed files with 7 additions and 14 deletions
13
kernel/smp.c
13
kernel/smp.c
|
|
@ -546,14 +546,10 @@ void __init setup_nr_cpu_ids(void)
|
|||
nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1;
|
||||
}
|
||||
|
||||
void __weak smp_announce(void)
|
||||
{
|
||||
printk(KERN_INFO "Brought up %d CPUs\n", num_online_cpus());
|
||||
}
|
||||
|
||||
/* Called by boot processor to activate the rest. */
|
||||
void __init smp_init(void)
|
||||
{
|
||||
int num_nodes, num_cpus;
|
||||
unsigned int cpu;
|
||||
|
||||
idle_threads_init();
|
||||
|
|
@ -567,8 +563,13 @@ void __init smp_init(void)
|
|||
cpu_up(cpu);
|
||||
}
|
||||
|
||||
num_nodes = num_online_nodes();
|
||||
num_cpus = num_online_cpus();
|
||||
pr_info("Brought up %d node%s, %d CPU%s\n",
|
||||
num_nodes, (num_nodes > 1 ? "s" : ""),
|
||||
num_cpus, (num_cpus > 1 ? "s" : ""));
|
||||
|
||||
/* Any cleanup work */
|
||||
smp_announce();
|
||||
smp_cpus_done(setup_max_cpus);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue