diff options
-rw-r--r-- | include/linux/syscalls.h | 6 | ||||
-rw-r--r-- | include/trace/ftrace.h | 3 | ||||
-rw-r--r-- | kernel/trace/trace.h | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 93515c6190a7..6ba163fb3684 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -153,7 +153,8 @@ static void prof_sysexit_disable_##sname(void) \ #define __SC_STR_TDECL6(t, a, ...) #t, __SC_STR_TDECL5(__VA_ARGS__) #define SYSCALL_TRACE_ENTER_EVENT(sname) \ - static struct ftrace_event_call event_enter_##sname; \ + static struct ftrace_event_call \ + __attribute__((__aligned__(4))) event_enter_##sname; \ struct trace_event enter_syscall_print_##sname = { \ .trace = print_syscall_enter, \ }; \ @@ -189,7 +190,8 @@ static void prof_sysexit_disable_##sname(void) \ } #define SYSCALL_TRACE_EXIT_EVENT(sname) \ - static struct ftrace_event_call event_exit_##sname; \ + static struct ftrace_event_call \ + __attribute__((__aligned__(4))) event_exit_##sname; \ struct trace_event exit_syscall_print_##sname = { \ .trace = print_syscall_exit, \ }; \ diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index dacb8ef67000..4b6a4a300167 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h @@ -43,7 +43,8 @@ tstruct \ char __data[0]; \ }; \ - static struct ftrace_event_call event_##name + static struct ftrace_event_call \ + __attribute__((__aligned__(4))) event_##name #undef __cpparg #define __cpparg(arg...) arg diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 405cb850b75d..374d4eeea9ea 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -746,7 +746,8 @@ extern const char *__stop___trace_bprintk_fmt[]; #undef FTRACE_ENTRY #define FTRACE_ENTRY(call, struct_name, id, tstruct, print) \ - extern struct ftrace_event_call event_##call; + extern struct ftrace_event_call \ + __attribute__((__aligned__(4))) event_##call; #undef FTRACE_ENTRY_DUP #define FTRACE_ENTRY_DUP(call, struct_name, id, tstruct, print) \ FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print)) |