* [PATCH] remove bogus UP on SMP kernel error
@ 2003-09-29 6:15 Nick Piggin
0 siblings, 0 replies; only message in thread
From: Nick Piggin @ 2003-09-29 6:15 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
This patch removes a bogus error message in the bogomips reporting code
when running an SMP kernel on UP. It makes the output consistent with what
you see on an SMP box. I noticed this while testing, but it recently
annoyed me again when booting a knoppix CD - its the first line you'll
see.
[-- Attachment #2: smp-no-up-err --]
[-- Type: text/plain, Size: 1777 bytes --]
--- linux-2.6/arch/i386/kernel/smpboot.c.orig 2003-08-25 20:28:34.000000000 +1000
+++ linux-2.6/arch/i386/kernel/smpboot.c 2003-09-01 14:02:45.000000000 +1000
@@ -937,6 +937,7 @@ int cpu_sibling_map[NR_CPUS] __cacheline
static void __init smp_boot_cpus(unsigned int max_cpus)
{
int apicid, cpu, bit, kicked;
+ unsigned long bogosum = 0;
/*
* Setup boot CPU information
@@ -1048,26 +1049,25 @@ static void __init smp_boot_cpus(unsigne
/*
* Allow the user to impress friends.
*/
-
Dprintk("Before bogomips.\n");
- if (!cpucount) {
- printk(KERN_ERR "Error: only one processor found.\n");
- } else {
- unsigned long bogosum = 0;
- for (cpu = 0; cpu < NR_CPUS; cpu++)
- if (cpu_isset(cpu, cpu_callout_map))
- bogosum += cpu_data[cpu].loops_per_jiffy;
- printk(KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n",
- cpucount+1,
- bogosum/(500000/HZ),
- (bogosum/(5000/HZ))%100);
- Dprintk("Before bogocount - setting activated=1.\n");
- }
+ for (cpu = 0; cpu < NR_CPUS; cpu++)
+ if (cpu_isset(cpu, cpu_callout_map))
+ bogosum += cpu_data[cpu].loops_per_jiffy;
+ printk(KERN_INFO
+ "Total of %d processors activated (%lu.%02lu BogoMIPS).\n",
+ cpucount+1,
+ bogosum/(500000/HZ),
+ (bogosum/(5000/HZ))%100);
+
+ Dprintk("Before bogocount - setting activated=1.\n");
if (smp_b_stepping)
printk(KERN_WARNING "WARNING: SMP operation may be unreliable with B stepping processors.\n");
- /* Don't taint if we are running SMP kernel on a single non-MP approved Athlon */
+ /*
+ * Don't taint if we are running SMP kernel on a single non-MP
+ * approved Athlon
+ */
if (tainted & TAINT_UNSAFE_SMP) {
if (cpucount)
printk (KERN_INFO "WARNING: This combination of AMD processors is not suitable for SMP.\n");
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-09-29 6:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-29 6:15 [PATCH] remove bogus UP on SMP kernel error Nick Piggin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.