Re: [GIT RFC] percpu: use dynamic percpu allocator as the default percpu allocator

Ingo Molnar
2009-03-25T12:24:42Z

* Tejun Heo <tj@kernel.org> wrote:

> > With your patches and a RELOC_HIDE version that uses the GOTENT
> > indirection the kernel won't compile because the "X" constraint
> > for the GOTENT access needs a symbol and there are quite a few
> > users that pass a pointer. I do not see a simple solution for
> > that problem yet.
>
> Ah... okay. Now I get it. It wasn't expecting variables there. How
> about doing the following?
>
> #define SHIFT_PERCPU_PTR(ptr, offset) (({ \
> if (__builtin_constant_p(ptr)) \
> do GOTENT trick; \
> else \
> RELOC_HIDE(); \
> }))
>
> Thanks.

Btw., is there any intermediate fix/workaround i could apply
perhaps? I'd like to send the percpu bits early in the merge window
and would hate to break Martin's arch ...

Ingo