[lkml]   [2010]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 7/8] percpu: add __percpu sparse annotations to hw_breakpoint

On 01/26/2010 10:02 AM, Frederic Weisbecker wrote:
> Well, sorry I must be missing something obvious, but is it impossible
> to make per_cpu(var, cpu) returning something cast in:
> (typeof(var) __force)
> Or I guess you did that already and it is not working with static
> arrays, or?

Yeap, the definition looks like

#define SHIFT_PERCPU_PTR(__p, __offset) ({ \
__verify_pcpu_ptr((__p)); \
RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset)); \
#define per_cpu(var, cpu) \
(*SHIFT_PERCPU_PTR(&(var), per_cpu_offset(cpu)))

but it just ends up putting the __force at the wrong layer. It seems
that (typeof(var) __kernel __force) tell sparse var is in the kernel
address space but not its members.

> Is there a patch that shows per_cpu() macro changes in the batch?

Sorry I forgot to write about this. It's in the percpu tree.

git:// for-next

The related commits are 545695fb41da117928ab946067a42d9e15fd009d and



 \ /
  Last update: 2010-01-26 02:17    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean