aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/mcount_64.S22
1 files changed, 7 insertions, 15 deletions
diff --git a/arch/x86/kernel/mcount_64.S b/arch/x86/kernel/mcount_64.S
index 6dc134b8dc70..24842c701660 100644
--- a/arch/x86/kernel/mcount_64.S
+++ b/arch/x86/kernel/mcount_64.S
@@ -21,12 +21,6 @@
21# define function_hook mcount 21# define function_hook mcount
22#endif 22#endif
23 23
24#ifdef CONFIG_DYNAMIC_FTRACE
25
26ENTRY(function_hook)
27 retq
28END(function_hook)
29
30/* skip is set if stack has been adjusted */ 24/* skip is set if stack has been adjusted */
31.macro ftrace_caller_setup trace_label skip=0 25.macro ftrace_caller_setup trace_label skip=0
32 MCOUNT_SAVE_FRAME \skip 26 MCOUNT_SAVE_FRAME \skip
@@ -47,6 +41,12 @@ GLOBAL(\trace_label)
47#endif 41#endif
48.endm 42.endm
49 43
44#ifdef CONFIG_DYNAMIC_FTRACE
45
46ENTRY(function_hook)
47 retq
48END(function_hook)
49
50#ifdef CONFIG_FRAME_POINTER 50#ifdef CONFIG_FRAME_POINTER
51/* 51/*
52 * Stack traces will stop at the ftrace trampoline if the frame pointer 52 * Stack traces will stop at the ftrace trampoline if the frame pointer
@@ -207,15 +207,7 @@ GLOBAL(ftrace_stub)
207 retq 207 retq
208 208
209trace: 209trace:
210 MCOUNT_SAVE_FRAME 210 ftrace_caller_setup ftrace_caller_op_ptr
211
212 movq RIP(%rsp), %rdi
213#ifdef CC_USING_FENTRY
214 movq SS+16(%rsp), %rsi
215#else
216 movq 8(%rbp), %rsi
217#endif
218 subq $MCOUNT_INSN_SIZE, %rdi
219 211
220 call *ftrace_trace_function 212 call *ftrace_trace_function
221 213