2 * Copyright IBM Corp. 2008, 2009
4 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>,
8 #include <linux/linkage.h>
9 #include <asm/asm-offsets.h>
10 #include <asm/ftrace.h>
12 .section .kprobes.text, "ax"
18 #ifdef CONFIG_DYNAMIC_FTRACE
23 larl %r1,function_trace_stop
30 stg %r1,__SF_BACKCHAIN(%r15)
33 aghi %r2,-MCOUNT_INSN_SIZE
34 larl %r14,ftrace_trace_function
37 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
40 ENTRY(ftrace_graph_caller)
41 # The bras instruction gets runtime patched to call prepare_ftrace_return.
42 # See ftrace_enable_ftrace_graph_caller. The patched instruction is:
43 # bras %r14,prepare_ftrace_return
52 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
54 ENTRY(return_to_handler)
58 stg %r1,__SF_BACKCHAIN(%r15)
59 brasl %r14,ftrace_return_to_handler