13 #include <linux/kernel.h>
14 #include <linux/types.h>
17 #include <asm/asm-offsets.h>
20 #define MCOUNT_OFFSET_RET 12
22 #define MCOUNT_OFFSET_RET 22
25 #ifdef CONFIG_DYNAMIC_FTRACE
27 void ftrace_disable_code(
void);
28 void ftrace_enable_insn(
void);
57 "ftrace_disable_code:\n"
63 "ftrace_enable_insn:\n"
66 #define FTRACE_INSN_SIZE 6
101 "ftrace_disable_code:\n"
105 "0: basr %r14,%r14\n"
108 "ftrace_enable_insn:\n"
111 #define FTRACE_INSN_SIZE 4
140 *(
unsigned long *) data = 0;
146 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
151 unsigned long __kprobes prepare_ftrace_return(
unsigned long parent,
162 if (!ftrace_graph_entry(&
trace)) {
171 #ifdef CONFIG_DYNAMIC_FTRACE
179 int ftrace_enable_ftrace_graph_caller(
void)
183 offset = ((
void *) prepare_ftrace_return -
184 (
void *) ftrace_graph_caller) / 2;
186 &offset,
sizeof(offset));
189 int ftrace_disable_ftrace_graph_caller(
void)
191 static unsigned short offset = 0x0002;
194 &offset,
sizeof(offset));