From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755480AbZKQQvg (ORCPT ); Tue, 17 Nov 2009 11:51:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752631AbZKQQvg (ORCPT ); Tue, 17 Nov 2009 11:51:36 -0500 Received: from relay1.sgi.com ([192.48.179.29]:44987 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752245AbZKQQvf (ORCPT ); Tue, 17 Nov 2009 11:51:35 -0500 Message-ID: <4B02D493.7000305@sgi.com> Date: Tue, 17 Nov 2009 08:51:31 -0800 From: Mike Travis User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: David Miller CC: gorcunov@gmail.com, hpa@zytor.com, mingo@elte.hu, tglx@linutronix.de, akpm@linux-foundation.org, heiko.carstens@de.ibm.com, rdreier@cisco.com, rdunlap@xenotime.net, tj@kernel.org, andi@firstfloor.org, gregkh@suse.de, yhlu.kernel@gmail.com, rientjes@google.com, rostedt@goodmis.org, rusty@rustcorp.com.au, seto.hidetoshi@jp.fujitsu.com, steiner@sgi.com, fweisbec@gmail.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/6] INIT: Limit the number of per cpu calibration bootup messages References: <20091116214302.GJ5653@lenovo> <4B01C81F.9040000@zytor.com> <20091116215052.GK5653@lenovo> <20091116.190922.182816918.davem@davemloft.net> In-Reply-To: <20091116.190922.182816918.davem@davemloft.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org David Miller wrote: > From: Cyrill Gorcunov > Date: Tue, 17 Nov 2009 00:50:52 +0300 > >> On Mon, Nov 16, 2009 at 01:46:07PM -0800, H. Peter Anvin wrote: >>> On 11/16/2009 01:43 PM, Cyrill Gorcunov wrote: >>>> It seems we have one >>>> >>>> arch/x86/kernel/setup.c:125:unsigned int boot_cpu_id __read_mostly; >>>> >>>> -- Cyrill >>> We probably should make it an inline function so that if other arches >>> want to define it to be a constant or some other kind of special thing >>> they can. >> IA-64 and SPARC already has this variable. But boot_cpu_id() as an >> inline function seem to be more natural/portable ineed. > > Only 32-bit SPARC actually has it. On sparc64 we have no reason to > remember which processor was the boot cpu, and remembering it merely > for the sake of only printing out the bogomips message once seems a > bit excessive? > > How about: > > static bool printed; > > if (!printed) { > printk(...); > printed = true; > } > > Or, alternatively, use an atomic_t instead of a bool if you think > races matter this early in the boot process. Yeah, I was thinking along these same lines. Thanks for the feedback! Mike