lkml.org 
[lkml]   [2008]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: initialization of static per-cpu variables
From
From: Rusty Russell <rusty@rustcorp.com.au>
Date: Thu, 22 May 2008 18:20:06 +1000

> On Thursday 22 May 2008 04:28:02 Vegard Nossum wrote:
> > Hi,
> >
> > I encountered this comment in kernel/softirq.c:
> >
> > /* Some compilers disobey section attribute on statics when not
> > initialized -- RR */
> > static DEFINE_PER_CPU(struct tasklet_head, tasklet_vec) = { NULL };
> > static DEFINE_PER_CPU(struct tasklet_head, tasklet_hi_vec) = { NULL };
> >
> > So I assume it's the combination of static and whatever section
> > DFINE_PER_CPU puts the variable in which is the problem.
> >
> > However, there's a LOT of these "static DEFINE_PER_CPU" without any
> > initializer in the rest of the code, e.g.:
>
> Yep, it was an old toolchain used by Sparc: DaveM found this one. As you say,
> it's ancient: I'm happy to queue a cleanup patch now everyone is on a modern
> compiler.

Yes, that workaround certainly can die now.


\
 
 \ /
  Last update: 2008-05-22 18:15    [W:0.078 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site