Messages in this thread | | | Subject | Re: s390(64) per_cpu in modules (ipv6) | From | Rusty Russell <> | Date | Sun, 17 Oct 2004 12:51:09 +1000 |
| |
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/
| |