summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/mcount_64.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/mcount_64.S')
-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 @@
# define function_hook mcount
#endif
-#ifdef CONFIG_DYNAMIC_FTRACE
-
-ENTRY(function_hook)
- retq
-END(function_hook)
-
/* skip is set if stack has been adjusted */
.macro ftrace_caller_setup trace_label skip=0
MCOUNT_SAVE_FRAME \skip
@@ -47,6 +41,12 @@ GLOBAL(\trace_label)
#endif
.endm
+#ifdef CONFIG_DYNAMIC_FTRACE
+
+ENTRY(function_hook)
+ retq
+END(function_hook)
+
#ifdef CONFIG_FRAME_POINTER
/*
* Stack traces will stop at the ftrace trampoline if the frame pointer
@@ -207,15 +207,7 @@ GLOBAL(ftrace_stub)
retq
trace:
- MCOUNT_SAVE_FRAME
-
- movq RIP(%rsp), %rdi
-#ifdef CC_USING_FENTRY
- movq SS+16(%rsp), %rsi
-#else
- movq 8(%rbp), %rsi
-#endif
- subq $MCOUNT_INSN_SIZE, %rdi
+ ftrace_caller_setup ftrace_caller_op_ptr
call *ftrace_trace_function