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
25 0: .long ftrace_trace_function
26 1: .long function_trace_stop
35 st %r0,__SF_BACKCHAIN(%r15)
37 ahi %r2,-MCOUNT_INSN_SIZE
41 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
44 ENTRY(ftrace_graph_caller)
45 # The bras instruction gets runtime patched to call prepare_ftrace_return.
46 # See ftrace_enable_ftrace_graph_caller. The patched instruction is:
47 # bras %r14,prepare_ftrace_return
53 3: lm %r2,%r5,16(%r15)
56 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
58 ENTRY(return_to_handler)
63 st %r0,__SF_BACKCHAIN(%r15)
65 .long ftrace_return_to_handler