Re: [PATCH] unbreak alpha percpu

From: Tejun Heo
Date: Tue Apr 14 2009 - 05:03:51 EST


Hello, Martin.

Martin Schwidefsky wrote:
> I would like to get rid of that SHIFT_PERCPU_PTR mess. The patch from
> Ivan will allow this, it uses a dummy variable to void the effect of a
> static modifier for percpu variables in modules. The percpu variable
> itself will be defined non-static, my gut feeling is that this is a
> dirty little trick that might bite us in the future.
> Another solution which I personally would prefer is to ban the use of
> static percpu variables. Then the compiler will use the GOT to get the
> address of percpu variables without any dirty tricks.

Hmmm... even if we can make combination of DECLARE_PER_CPU() and
static DEFINE_PER_CPU() trigger compile error? That pretty much
implements most of what the programmer intends by "static" but yeah
it's a bit convoluted.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/