xref: /openbmc/linux/arch/mips/include/asm/ftrace.h (revision d2bb0762)
1d2bb0762SWu Zhangjin /*
2d2bb0762SWu Zhangjin  * This file is subject to the terms and conditions of the GNU General Public
3d2bb0762SWu Zhangjin  * License.  See the file "COPYING" in the main directory of this archive for
4d2bb0762SWu Zhangjin  * more details.
5d2bb0762SWu Zhangjin  *
6d2bb0762SWu Zhangjin  * Copyright (C) 2009 DSLab, Lanzhou University, China
7d2bb0762SWu Zhangjin  * Author: Wu Zhangjin <wuzj@lemote.com>
8d2bb0762SWu Zhangjin  */
9d2bb0762SWu Zhangjin 
10d2bb0762SWu Zhangjin #ifndef _ASM_MIPS_FTRACE_H
11d2bb0762SWu Zhangjin #define _ASM_MIPS_FTRACE_H
12d2bb0762SWu Zhangjin 
13d2bb0762SWu Zhangjin #ifdef CONFIG_FUNCTION_TRACER
14d2bb0762SWu Zhangjin 
15d2bb0762SWu Zhangjin #define MCOUNT_ADDR ((unsigned long)(_mcount))
16d2bb0762SWu Zhangjin #define MCOUNT_INSN_SIZE 4		/* sizeof mcount call */
17d2bb0762SWu Zhangjin 
18d2bb0762SWu Zhangjin #ifndef __ASSEMBLY__
19d2bb0762SWu Zhangjin extern void _mcount(void);
20d2bb0762SWu Zhangjin #define mcount _mcount
21d2bb0762SWu Zhangjin 
22d2bb0762SWu Zhangjin #endif /* __ASSEMBLY__ */
23d2bb0762SWu Zhangjin #endif /* CONFIG_FUNCTION_TRACER */
24d2bb0762SWu Zhangjin #endif /* _ASM_MIPS_FTRACE_H */
25