AKASHI Takahiro | fc0c939 | 2014-04-30 18:54:33 +0900 | [diff] [blame] | 1 | /* |
| 2 | * arch/arm64/include/asm/ftrace.h |
| 3 | * |
| 4 | * Copyright (C) 2013 Linaro Limited |
| 5 | * Author: AKASHI Takahiro <takahiro.akashi@linaro.org> |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License version 2 as |
| 9 | * published by the Free Software Foundation. |
| 10 | */ |
| 11 | #ifndef __ASM_FTRACE_H |
| 12 | #define __ASM_FTRACE_H |
| 13 | |
| 14 | #include <asm/insn.h> |
| 15 | |
| 16 | #define MCOUNT_ADDR ((unsigned long)_mcount) |
| 17 | #define MCOUNT_INSN_SIZE AARCH64_INSN_SIZE |
| 18 | |
| 19 | #ifndef __ASSEMBLY__ |
| 20 | extern void _mcount(unsigned long); |
AKASHI Takahiro | 95d7e55 | 2014-04-30 18:54:34 +0900 | [diff] [blame^] | 21 | |
| 22 | struct dyn_arch_ftrace { |
| 23 | /* No extra data needed for arm64 */ |
| 24 | }; |
| 25 | |
| 26 | extern unsigned long ftrace_graph_call; |
| 27 | |
| 28 | static inline unsigned long ftrace_call_adjust(unsigned long addr) |
| 29 | { |
| 30 | /* |
| 31 | * addr is the address of the mcount call instruction. |
| 32 | * recordmcount does the necessary offset calculation. |
| 33 | */ |
| 34 | return addr; |
| 35 | } |
AKASHI Takahiro | fc0c939 | 2014-04-30 18:54:33 +0900 | [diff] [blame] | 36 | #endif /* __ASSEMBLY__ */ |
| 37 | |
| 38 | #endif /* __ASM_FTRACE_H */ |