rediffed chatty printk running SMP kernel with 1 CPU
From: Nick Piggin <[email protected]>
This removes the reporting of the "error", and makes the output consistent with running the same kernel on an SMP box.
Against test4
arch/i386/kernel/smpboot.c renamed from arch/i386/kernel/smpboot.c.orig +15 -15
@@ -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
@@ -1048,26 +1049,25 @@/* * 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" );
Signature · 3 lines
What is this? http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/ Don't blame me: the Monkey is driving File: Nick Piggin <[email protected]>: [PATCH] rediffed chatty printk running SMP kernel with 1 CPU