[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B01C803.1010303@sgi.com>
Date: Mon, 16 Nov 2009 13:45:39 -0800
From: Mike Travis <travis@....com>
To: Ingo Molnar <mingo@...e.hu>
CC: Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Roland Dreier <rdreier@...co.com>,
Randy Dunlap <rdunlap@...otime.net>, Tejun Heo <tj@...nel.org>,
Andi Kleen <andi@...stfloor.org>,
Greg Kroah-Hartman <gregkh@...e.de>,
Yinghai Lu <yhlu.kernel@...il.com>,
"H. Peter Anvin" <hpa@...or.com>,
David Rientjes <rientjes@...gle.com>,
Steven Rostedt <rostedt@...dmis.org>,
Rusty Russell <rusty@...tcorp.com.au>,
Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>,
Jack Steiner <steiner@....com>,
Frederic Weisbecker <fweisbec@...il.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/6] INIT: Limit the number of per cpu calibration bootup
messages
Ingo Molnar wrote:
> * Mike Travis <travis@....com> wrote:
>
>> --- linux.orig/init/calibrate.c
>> +++ linux/init/calibrate.c
>> @@ -123,23 +123,26 @@
>> {
>> unsigned long ticks, loopbit;
>> int lps_precision = LPS_PREC;
>> + bool boot_cpu = (smp_processor_id() == 0);
>
> this code is shared by other architectures too - are you sure
> smp_processor_id()==0 is a proper 'I am the boot CPU' assumption
> everywhere?
>
> Ingo
This was where having the boot_cpu_id would have been handy.
I could add something like:
--- linux.orig/init/main.c
+++ linux/init/main.c
@@ -539,13 +539,15 @@
* Activate the first processor.
*/
+int boot_cpu_id __read_mostly;
+
static void __init boot_cpu_init(void)
{
- int cpu = smp_processor_id();
+ int boot_cpu_id = smp_processor_id();
/* Mark the boot cpu "present", "online" etc for SMP and UP case */
- set_cpu_online(cpu, true);
- set_cpu_present(cpu, true);
- set_cpu_possible(cpu, true);
+ set_cpu_online(boot_cpu_id, true);
+ set_cpu_present(boot_cpu_id, true);
+ set_cpu_possible(boot_cpu_id, true);
}
void __init __weak smp_setup_processor_id(void)
and remove boot_cpu_id from arch/x86 ... ?
Thanks,
Mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists