tracing: Fix some section mismatch warnings
authorLi Zefan <lizefan@huawei.com>
Mon, 4 Mar 2013 06:15:59 +0000 (14:15 +0800)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 15 Mar 2013 04:34:54 +0000 (00:34 -0400)
As we've added __init annotation to field-defining functions, we should
add __refdata annotation to event_call variables, which reference those
functions.

Link: http://lkml.kernel.org/r/51343C1F.2050502@huawei.com
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
include/trace/ftrace.h
kernel/trace/trace_export.c
kernel/trace/trace_syscalls.c

index a536f66f84c611f91b8e36cebbbab95344fa9c6c..bbf09c2021b9aae3475e6d5dbb8178c2c97f1675 100644 (file)
@@ -572,7 +572,7 @@ static inline void ftrace_test_probe_##call(void)                   \
 #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
 _TRACE_PERF_PROTO(call, PARAMS(proto));                                        \
 static const char print_fmt_##call[] = print;                          \
-static struct ftrace_event_class __used event_class_##call = {         \
+static struct ftrace_event_class __used __refdata event_class_##call = { \
        .system                 = __stringify(TRACE_SYSTEM),            \
        .define_fields          = ftrace_define_fields_##call,          \
        .fields                 = LIST_HEAD_INIT(event_class_##call.fields),\
index 4f6a91c1370c7c2bd2c6eb1accf0dc5be0c472c9..d21a74670088345fd97a81724e894ba9a0baff79 100644 (file)
@@ -168,7 +168,7 @@ ftrace_define_fields_##name(struct ftrace_event_call *event_call)   \
 #define FTRACE_ENTRY_REG(call, struct_name, etype, tstruct, print, filter,\
                         regfn)                                         \
                                                                        \
-struct ftrace_event_class event_class_ftrace_##call = {                        \
+struct ftrace_event_class __refdata event_class_ftrace_##call = {      \
        .system                 = __stringify(TRACE_SYSTEM),            \
        .define_fields          = ftrace_define_fields_##call,          \
        .fields                 = LIST_HEAD_INIT(event_class_ftrace_##call.fields),\
index 00b5c3e6fbbe9767cdb42e3653ebcd5d26af8843..1cd37ffb4093f6fa678ac5eda7d6e0f6d05240a1 100644 (file)
@@ -479,7 +479,7 @@ struct trace_event_functions exit_syscall_print_funcs = {
        .trace          = print_syscall_exit,
 };
 
-struct ftrace_event_class event_class_syscall_enter = {
+struct ftrace_event_class __refdata event_class_syscall_enter = {
        .system         = "syscalls",
        .reg            = syscall_enter_register,
        .define_fields  = syscall_enter_define_fields,
@@ -487,7 +487,7 @@ struct ftrace_event_class event_class_syscall_enter = {
        .raw_init       = init_syscall_trace,
 };
 
-struct ftrace_event_class event_class_syscall_exit = {
+struct ftrace_event_class __refdata event_class_syscall_exit = {
        .system         = "syscalls",
        .reg            = syscall_exit_register,
        .define_fields  = syscall_exit_define_fields,