lkml.org 
[lkml]   [2009]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT RFC] percpu: use dynamic percpu allocator as the default percpu allocator
On Wed, 25 Mar 2009 20:51:31 +0900
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(); \
> }))

That doesn't work because __builtin_constant_p is false for variable
symbols. I would need a __builtin_symbol_p but that doesn't exist.

--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.



\
 
 \ /
  Last update: 2009-03-25 15:05    [W:0.116 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site