lkml.org 
[lkml]   [2004]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: s390(64) per_cpu in modules (ipv6)
From
Date
On Fri, 2004-10-15 at 19:15, Martin Schwidefsky wrote:
>
>
> Rusty Russell <rusty@rustcorp.com.au> wrote on 15/10/2004 03:41:40 AM:

> > The worse problem is that a (static) per-cpu var declared *inside* a
> > function gets renamed by gcc; IIRC some generic code used to do this.
>
> __thread in the kernel would be a real innovation, but I fear it isn't easy.
> The problem with the per_cpu__x variables in modules is solved for s390x
> by the way.

Sure, but it doesn't solve this case, AFAICT:

void func(void)
{
static DEFINE_PER_CPU(x, int);

__get_per_cpu(x)++;
}

The compiler will create a variable called "per_cpu__x.0" and your asm
reference to "per_cpu__x" will cause a link failure, no? Obviously, you
would have noticed this, so I'm wondering what I'm missing.

I hit this in mm/page-writeback.c:balance_dirty_pages_ratelimited().

Confused,
Rusty.
--
Anyone who quotes me in their signature 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 14:07    [W:0.021 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site