ftrace.c (af64a7cb09db77344c596a0bf3d57d77257e8bf5) ftrace.c (3a36cb11ca65cd6804972eaf1000378ba4384ea7)
1/*
2 * Code for replacing ftrace calls with jumps.
3 *
4 * Copyright (C) 2007-2008 Steven Rostedt <srostedt@redhat.com>
5 * Copyright (C) 2009, 2010 DSLab, Lanzhou University, China
6 * Author: Wu Zhangjin <wuzhangjin@gmail.com>
7 *
8 * Thanks goes to Steven Rostedt for writing the original x86 version.

--- 184 unchanged lines hidden (view full) ---

193{
194 unsigned int new;
195
196 new = INSN_JAL((unsigned long)func);
197
198 return ftrace_modify_code(FTRACE_CALL_IP, new);
199}
200
1/*
2 * Code for replacing ftrace calls with jumps.
3 *
4 * Copyright (C) 2007-2008 Steven Rostedt <srostedt@redhat.com>
5 * Copyright (C) 2009, 2010 DSLab, Lanzhou University, China
6 * Author: Wu Zhangjin <wuzhangjin@gmail.com>
7 *
8 * Thanks goes to Steven Rostedt for writing the original x86 version.

--- 184 unchanged lines hidden (view full) ---

193{
194 unsigned int new;
195
196 new = INSN_JAL((unsigned long)func);
197
198 return ftrace_modify_code(FTRACE_CALL_IP, new);
199}
200
201int __init ftrace_dyn_arch_init(void *data)
201int __init ftrace_dyn_arch_init(void)
202{
203 /* Encode the instructions when booting */
204 ftrace_dyn_arch_init_insns();
205
206 /* Remove "b ftrace_stub" to ensure ftrace_caller() is executed */
207 ftrace_modify_code(MCOUNT_ADDR, INSN_NOP);
208
209 return 0;

--- 187 unchanged lines hidden ---
202{
203 /* Encode the instructions when booting */
204 ftrace_dyn_arch_init_insns();
205
206 /* Remove "b ftrace_stub" to ensure ftrace_caller() is executed */
207 ftrace_modify_code(MCOUNT_ADDR, INSN_NOP);
208
209 return 0;

--- 187 unchanged lines hidden ---