18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci#ifndef __ASM_CSKY_FTRACE_H
58c2ecf20Sopenharmony_ci#define __ASM_CSKY_FTRACE_H
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#define MCOUNT_INSN_SIZE	14
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#define HAVE_FUNCTION_GRAPH_FP_TEST
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#define HAVE_FUNCTION_GRAPH_RET_ADDR_PTR
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#define ARCH_SUPPORTS_FTRACE_OPS 1
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#define MCOUNT_ADDR	((unsigned long)_mcount)
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci#ifndef __ASSEMBLY__
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ciextern void _mcount(unsigned long);
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciextern void ftrace_graph_call(void);
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_cistatic inline unsigned long ftrace_call_adjust(unsigned long addr)
248c2ecf20Sopenharmony_ci{
258c2ecf20Sopenharmony_ci	return addr;
268c2ecf20Sopenharmony_ci}
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_cistruct dyn_arch_ftrace {
298c2ecf20Sopenharmony_ci};
308c2ecf20Sopenharmony_ci#endif /* !__ASSEMBLY__ */
318c2ecf20Sopenharmony_ci#endif /* __ASM_CSKY_FTRACE_H */
32