1 diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h
2 index f08f973..e0fbf29 100644
3 --- a/arch/x86/include/asm/system.h
4 +++ b/arch/x86/include/asm/system.h
5 @@ -449,7 +449,7 @@ void stop_this_cpu(void *dummy);
7 * (Could use an alternative three way for this if there was one.)
9 -static inline void rdtsc_barrier(void)
10 +static __always_inline void rdtsc_barrier(void)
12 alternative(ASM_NOP3, "mfence", X86_FEATURE_MFENCE_RDTSC);
13 alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);
14 diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
15 index 71c9050..3e35002 100644
16 --- a/include/linux/syscalls.h
17 +++ b/include/linux/syscalls.h
18 @@ -154,7 +154,8 @@ static void prof_sysexit_disable_##sname(struct ftrace_event_call *unused) \
19 #define __SC_STR_TDECL6(t, a, ...) #t, __SC_STR_TDECL5(__VA_ARGS__)
21 #define SYSCALL_TRACE_ENTER_EVENT(sname) \
22 - static struct ftrace_event_call event_enter_##sname; \
23 + static struct ftrace_event_call \
24 + __attribute__((__aligned__(4))) event_enter_##sname; \
25 struct trace_event enter_syscall_print_##sname = { \
26 .trace = print_syscall_enter, \
28 @@ -190,7 +191,8 @@ static void prof_sysexit_disable_##sname(struct ftrace_event_call *unused) \
31 #define SYSCALL_TRACE_EXIT_EVENT(sname) \
32 - static struct ftrace_event_call event_exit_##sname; \
33 + static struct ftrace_event_call \
34 + __attribute__((__aligned__(4))) event_exit_##sname; \
35 struct trace_event exit_syscall_print_##sname = { \
36 .trace = print_syscall_exit, \
38 diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
39 index bc309b2..f14d954 100644
40 --- a/include/trace/ftrace.h
41 +++ b/include/trace/ftrace.h
45 #define DEFINE_EVENT(template, name, proto, args) \
46 - static struct ftrace_event_call event_##name
47 + static struct ftrace_event_call \
48 + __attribute__((__aligned__(4))) event_##name
50 #undef DEFINE_EVENT_PRINT
51 #define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
52 diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
53 index 6167a38..1ad2d01 100644
54 --- a/kernel/trace/trace.h
55 +++ b/kernel/trace/trace.h
56 @@ -760,7 +760,8 @@ extern const char *__stop___trace_bprintk_fmt[];
59 #define FTRACE_ENTRY(call, struct_name, id, tstruct, print) \
60 - extern struct ftrace_event_call event_##call;
61 + extern struct ftrace_event_call \
62 + __attribute__((__aligned__(4))) event_##call;
63 #undef FTRACE_ENTRY_DUP
64 #define FTRACE_ENTRY_DUP(call, struct_name, id, tstruct, print) \
65 FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print))