4 * Copyright (C) 2008 Paul Mundt
5 * Copyright (C) 2008 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
40 #ifdef CONFIG_DYNAMIC_FTRACE
43 mov.l .Lftrace_stub, r6
45 mov.l .Lftrace_trace_function, r6
59 .Lftrace_trace_function:
60 .long ftrace_trace_function
62 #ifdef CONFIG_DYNAMIC_FTRACE
69 mov.l .Lftrace_stub, r6
74 #endif /* CONFIG_DYNAMIC_FTRACE */
77 * NOTE: From here on the locations of the .Lftrace_stub label and
78 * ftrace_stub itself are fixed. Adding additional data here will skew
79 * the displacement for the memory table and break the block replacement.
80 * Place new labels either after the ftrace_stub body, or before
81 * ftrace_caller. You have been warned.