All of lore.kernel.org
 help / color / mirror / Atom feed
* [TRIVIAL] Re: Remove chatty printk on CPU bringup.
@ 2003-07-21 11:28 Rusty Trivial Russell
  0 siblings, 0 replies; only message in thread
From: Rusty Trivial Russell @ 2003-07-21 11:28 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

[ Only having one processor is not an error.  It still happens to some
  people: let's not deprive them of their bogomips printk as well --RR ]


From:  Nick Piggin <piggin@cyberone.com.au>

  
  Rusty Russell wrote:
  
  >In message <3F092E1F.7060406@cyberone.com.au> you write:
  >
  >>Hi Rusty,
  >>That reminds me of this minor irritation. Maybe you
  >>could get it applied. _Or_, do the else block
  >>unconditionally - which would get a more consistent
  >>output. Either way I fail to see how its an error.
  >>
  >
  >Hmm, this means an SMP configuration is found, but there's only one
  >CPU.  Does this actually happen for you?
  >
  
  I test with SMP kernels on that computer I use at IBM. That
  is how I came across the error.
  
  >
  >If so, agreed.  My crash box is SMP: can you eliminate that branch
  >entirely and do a test boot for me?
  >
  I don't have a UP here to test with, and the test doesn't
  trigger with nosmp. Anyway the following compiles and boots
  on SMP.
  

--- trivial-2.5.75-bk3/arch/i386/kernel/smpboot.c.orig	2003-07-21 21:22:56.000000000 +1000
+++ trivial-2.5.75-bk3/arch/i386/kernel/smpboot.c	2003-07-21 21:22:56.000000000 +1000
@@ -937,6 +937,7 @@
 static void __init smp_boot_cpus(unsigned int max_cpus)
 {
 	int apicid, cpu, bit, kicked;
+	unsigned long bogosum = 0;
 
 	/*
 	 * Setup boot CPU information
@@ -1050,24 +1051,23 @@
 	 */
 
 	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_callout_map & (1<<cpu))
-				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_callout_map & (1<<cpu))
+			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");
-- 
  What is this? http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/
  Don't blame me: the Monkey is driving
  File: Nick Piggin <piggin@cyberone.com.au>: Re: [TRIVIAL] Remove chatty printk on CPU bringup.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-07-21 11:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-21 11:28 [TRIVIAL] Re: Remove chatty printk on CPU bringup Rusty Trivial Russell

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.