]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Correct CPUs printout on boot.
authorDave Jones <davej@redhat.com>
Fri, 23 Jan 2004 00:12:48 +0000 (16:12 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Fri, 23 Jan 2004 00:12:48 +0000 (16:12 -0800)
This currently prints out the maximum number of CPUs the
kernel is configured to support, instead of the actual
number that the kernel brought up. Which results in odd
displays that look like you have more CPUs than you do.

init/main.c

index a02aa14fdcd533576c785a2ab1a664c744bcc3a5..526420af8392c4b0e76134ba070af9a6baca73f2 100644 (file)
@@ -339,7 +339,7 @@ static void __init setup_per_cpu_areas(void)
 /* Called by boot processor to activate the rest. */
 static void __init smp_init(void)
 {
-       unsigned int i;
+       unsigned int i, j=0;
 
        /* FIXME: This should be done in userspace --RR */
        for (i = 0; i < NR_CPUS; i++) {
@@ -348,11 +348,12 @@ static void __init smp_init(void)
                if (cpu_possible(i) && !cpu_online(i)) {
                        printk("Bringing up %i\n", i);
                        cpu_up(i);
+                       j++;
                }
        }
 
        /* Any cleanup work */
-       printk("CPUS done %u\n", max_cpus);
+       printk("CPUS done %u\n", j);
        smp_cpus_done(max_cpus);
 #if 0
        /* Get other processors into their bootup holding patterns. */