xref: /linux/arch/microblaze/include/asm/ftrace.h (revision 1d6571a8794ba276a078a8ca9d84ccc157f8b6c3)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
22fd7c761SMichal Simek #ifndef _ASM_MICROBLAZE_FTRACE
32fd7c761SMichal Simek #define _ASM_MICROBLAZE_FTRACE
46c149fd7SMichal Simek 
52fd7c761SMichal Simek #ifdef CONFIG_FUNCTION_TRACER
62fd7c761SMichal Simek 
7c93bf928SMinfei Huang #define MCOUNT_ADDR		((unsigned long)(_mcount))
82fd7c761SMichal Simek #define MCOUNT_INSN_SIZE	8 /* sizeof mcount call */
92fd7c761SMichal Simek 
102fd7c761SMichal Simek #ifndef __ASSEMBLY__
112fd7c761SMichal Simek extern void _mcount(void);
122fd7c761SMichal Simek extern void ftrace_call_graph(void);
13*1d6571a8SArnd Bergmann void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr);
142fd7c761SMichal Simek #endif
152fd7c761SMichal Simek 
167d241ff0SMichal Simek #ifdef CONFIG_DYNAMIC_FTRACE
17f2cc020dSIngo Molnar /* relocation of mcount call site is the same as the address */
187d241ff0SMichal Simek static inline unsigned long ftrace_call_adjust(unsigned long addr)
197d241ff0SMichal Simek {
207d241ff0SMichal Simek 	return addr;
217d241ff0SMichal Simek }
227d241ff0SMichal Simek 
237d241ff0SMichal Simek struct dyn_arch_ftrace {
247d241ff0SMichal Simek };
257d241ff0SMichal Simek #endif /* CONFIG_DYNAMIC_FTRACE */
267d241ff0SMichal Simek 
272fd7c761SMichal Simek #endif /* CONFIG_FUNCTION_TRACER */
282fd7c761SMichal Simek #endif /* _ASM_MICROBLAZE_FTRACE */
29