Commit 4a664175 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Neaten and fix init/main.c cpu bringup message

From: Andrew Theurer <habanero@us.ibm.com>

Use num_online_cpus in smp_init instead of counting cpus which may or may not
really be brought up.
parent 245f2bf2
...@@ -350,20 +350,17 @@ static void __init setup_per_cpu_areas(void) ...@@ -350,20 +350,17 @@ static void __init setup_per_cpu_areas(void)
static void __init smp_init(void) static void __init smp_init(void)
{ {
unsigned int i; unsigned int i;
unsigned j = 1;
/* FIXME: This should be done in userspace --RR */ /* FIXME: This should be done in userspace --RR */
for_each_present_cpu(i) { for_each_present_cpu(i) {
if (num_online_cpus() >= max_cpus) if (num_online_cpus() >= max_cpus)
break; break;
if (!cpu_online(i)) { if (!cpu_online(i))
cpu_up(i); cpu_up(i);
j++;
}
} }
/* Any cleanup work */ /* Any cleanup work */
printk("Brought up %u CPUs\n", j); printk("Brought up %ld CPUs\n", (long)num_online_cpus());
smp_cpus_done(max_cpus); smp_cpus_done(max_cpus);
#if 0 #if 0
/* Get other processors into their bootup holding patterns. */ /* Get other processors into their bootup holding patterns. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment