aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/mcount.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze/kernel/mcount.S')
-rw-r--r--arch/microblaze/kernel/mcount.S13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/microblaze/kernel/mcount.S b/arch/microblaze/kernel/mcount.S
index 97eef3eea944..30aaf8fb55b2 100644
--- a/arch/microblaze/kernel/mcount.S
+++ b/arch/microblaze/kernel/mcount.S
@@ -83,6 +83,12 @@ ENTRY(ftrace_stub)
83 nop; 83 nop;
84 84
85ENTRY(_mcount) 85ENTRY(_mcount)
86#ifdef CONFIG_DYNAMIC_FTRACE
87ENTRY(ftrace_caller)
88 /* MS: It is just barrier which is removed from C code */
89 rtsd r15, 8
90 nop
91#endif /* CONFIG_DYNAMIC_FTRACE */
86 SAVE_REGS 92 SAVE_REGS
87 swi r15, r1, 0; 93 swi r15, r1, 0;
88 /* MS: HAVE_FUNCTION_TRACE_MCOUNT_TEST begin of checking */ 94 /* MS: HAVE_FUNCTION_TRACE_MCOUNT_TEST begin of checking */
@@ -90,12 +96,19 @@ ENTRY(_mcount)
90 bneid r5, end; 96 bneid r5, end;
91 nop; 97 nop;
92 /* MS: HAVE_FUNCTION_TRACE_MCOUNT_TEST end of checking */ 98 /* MS: HAVE_FUNCTION_TRACE_MCOUNT_TEST end of checking */
99#ifndef CONFIG_DYNAMIC_FTRACE
93 /* MS: test function trace if is taken or not */ 100 /* MS: test function trace if is taken or not */
94 lwi r20, r0, ftrace_trace_function; 101 lwi r20, r0, ftrace_trace_function;
95 addik r6, r0, ftrace_stub; 102 addik r6, r0, ftrace_stub;
96 cmpu r5, r20, r6; /* ftrace_trace_function != ftrace_stub */ 103 cmpu r5, r20, r6; /* ftrace_trace_function != ftrace_stub */
97 beqid r5, end; /* MS: not taken -> jump over */ 104 beqid r5, end; /* MS: not taken -> jump over */
98 nop; 105 nop;
106#else /* CONFIG_DYNAMIC_FTRACE */
107NOALIGN_ENTRY(ftrace_call)
108/* instruction for setup imm FUNC_part1, addik r20, r0, FUNC_part2 */
109 nop
110 nop
111#endif /* CONFIG_DYNAMIC_FTRACE */
99/* static normal trace */ 112/* static normal trace */
100 lwi r6, r1, 120; /* MS: load parent addr */ 113 lwi r6, r1, 120; /* MS: load parent addr */
101 addik r5, r15, 0; /* MS: load current function addr */ 114 addik r5, r15, 0; /* MS: load current function addr */