lkml.org 
[lkml]   [2002]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Important per-cpu fix.
Date
In message <20020906095743.A35@toy.ucw.cz> you write:
> Hi!
>
> > > Actually Rusty what's the big deal, add an "initializer"
> > > arg to the macro. It doesn't hurt anyone, it doesn't lose
> > > any space in the kernel image, and the macro arg reminds
> > > people to do it.
> > >
> > > I think it's a small price to pay to keep a longer range
> > > of compilers supported :-)
> >
> > I disagree. They might not have a convenient (static) initializer, in
> > which case it's simply cruel and unusual, to work around an obscure
> > compiler bug.
>
> Ugh? of course it will always have convient initializer, namely zero.

What if you really need to initialize them at runtime? You're putting
a static initializer there simply to mask an obscure toolchain bug.
I'd really prefer dotting:

/* FIXME: Initializer required so gcc 2.96 doesn't put in BSS */
DEFINE_PER_CPU(int, xxx) = 0;

everywhere, which can be deleted later, to enforcing it for everyone
in the infrastructure when it doesn't always make sense.

Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.120 / U:1.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site