| 1 |
/* |
| 2 |
* arch/xtensa/include/asm/ftrace.h |
| 3 |
* |
| 4 |
* This file is subject to the terms and conditions of the GNU General Public |
| 5 |
* License. See the file "COPYING" in the main directory of this archive |
| 6 |
* for more details. |
| 7 |
* |
| 8 |
* Copyright (C) 2013 Tensilica Inc. |
| 9 |
*/ |
| 10 |
#ifndef _XTENSA_FTRACE_H |
| 11 |
#define _XTENSA_FTRACE_H |
| 12 |
|
| 13 |
#include <asm/processor.h> |
| 14 |
|
| 15 |
#ifndef __ASSEMBLER__ |
| 16 |
extern unsigned long return_address(unsigned level); |
| 17 |
#define ftrace_return_address(n) return_address(n) |
| 18 |
#endif /* __ASSEMBLER__ */ |
| 19 |
|
| 20 |
#ifdef CONFIG_FUNCTION_TRACER |
| 21 |
|
| 22 |
#define MCOUNT_ADDR ((unsigned long)(_mcount)) |
| 23 |
#define MCOUNT_INSN_SIZE 3 |
| 24 |
|
| 25 |
#ifndef __ASSEMBLER__ |
| 26 |
extern void _mcount(void); |
| 27 |
#define mcount _mcount |
| 28 |
#endif /* __ASSEMBLER__ */ |
| 29 |
#endif /* CONFIG_FUNCTION_TRACER */ |
| 30 |
|
| 31 |
#endif /* _XTENSA_FTRACE_H */ |