lkml.org 
[lkml]   [2009]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/6] INIT: Limit the number of per cpu calibration bootup messages
On Mon, Nov 16, 2009 at 07:09:22PM -0800, David Miller wrote:
...
> >
> > 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.
>

Hi David,

I must admit I know *nothing* about SPARC code. I was rather pointing
out that some archs already use this variable. IOW it means
that per-platform boot_cpu_id() helper implementation may be not
that simple. Perhaps for other archs like SPARC64, where as you
said no need to remember boot cpu id at all, we should define
some __weak per-kernel global helper which would return 0
and every arch would implement own helper boot_cpu_id().

-- Cyrill


\
 
 \ /
  Last update: 2009-11-17 17:03    [W:0.074 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site