Re: [PATCH] unbreak alpha percpu

Tejun Heo
2009-04-14T09:03:51Z

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