4 * Copyright (C) 2008 Paul Mundt
5 * Copyright (C) 2008, 2009 Matt Fleming
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
11 #include <asm/ftrace.h>
13 #define MCOUNT_ENTER() \
23 #define MCOUNT_LEAVE() \
33 .type _mcount,@function
35 .type mcount,@function
38 #ifndef CONFIG_DYNAMIC_FTRACE
39 mov.l .Lfunction_trace_stop, r0
46 #ifdef CONFIG_DYNAMIC_FTRACE
49 mov.l .Lftrace_stub, r6
51 mov.l .Lftrace_trace_function, r6
65 .Lftrace_trace_function:
66 .long ftrace_trace_function
68 #ifdef CONFIG_DYNAMIC_FTRACE
71 mov.l .Lfunction_trace_stop, r0
80 mov.l .Lftrace_stub, r6
85 #endif /* CONFIG_DYNAMIC_FTRACE */
88 * NOTE: From here on the locations of the .Lftrace_stub label and
89 * ftrace_stub itself are fixed. Adding additional data here will skew
90 * the displacement for the memory table and break the block replacement.
91 * Place new labels either after the ftrace_stub body, or before
92 * ftrace_caller. You have been warned.
104 .Lfunction_trace_stop:
105 .long function_trace_stop