Messages in this thread | | | Date | Sat, 2 Mar 2013 21:23:30 +0800 | From | Fengguang Wu <> | Subject | Re: [trace:tip/perf/core 5/15] kernel/trace/trace_functions.c:79:16: sparse: incorrect type in initializer (different address spaces) |
| |
On Sat, Mar 02, 2013 at 08:15:22AM -0500, Steven Rostedt wrote: > On Sat, 2013-03-02 at 08:12 -0500, Steven Rostedt wrote: > > > Hmm, actually it seems to be complaining everywhere but in trace.c which > > is where the per_cpu was allocated. Do I need to annotate the trace.h > > header to specify (at least to sparse) that the pointer is allocated per > > cpu? > > I guess I need this patch:
That's it! Verified with
make C=1 kernel/trace/trace_functions.o
Thanks, Fengguang
> diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h > index c597523..50a9c81 100644 > --- a/kernel/trace/trace.h > +++ b/kernel/trace/trace.h > @@ -198,7 +198,7 @@ struct trace_array { > struct list_head systems; > struct list_head events; > struct task_struct *waiter; > - struct trace_array_cpu *data; > + struct trace_array_cpu __percpu *data; > }; > > enum { > > -- Steve >
| |