From 1ed0cdc20167bf25f6706bace655edca12813687 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Thu, 22 Jan 2004 16:12:48 -0800 Subject: [PATCH] [PATCH] Correct CPUs printout on boot. 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init/main.c b/init/main.c index a02aa14fdcd53..526420af8392c 100644 --- a/init/main.c +++ b/init/main.c @@ -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. */ -- 2.53.0