blob: ed5c448ece991165ee322f8afc05610b3de88ba9 [file] [log] [blame]
AKASHI Takahirofc0c9392014-04-30 18:54:33 +09001/*
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__
20extern void _mcount(unsigned long);
AKASHI Takahiro95d7e552014-04-30 18:54:34 +090021
22struct dyn_arch_ftrace {
23 /* No extra data needed for arm64 */
24};
25
26extern unsigned long ftrace_graph_call;
27
28static 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 Takahirofc0c9392014-04-30 18:54:33 +090036#endif /* __ASSEMBLY__ */
37
38#endif /* __ASM_FTRACE_H */