ftrace/x86: Have x86 ftrace use the ftrace_modify_all_code()
To remove duplicate code, have the ftrace arch_ftrace_update_code() use the generic ftrace_modify_all_code(). This requires that the default ftrace_replace_code() becomes a weak function so that an arch may override it. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:

committed by
Steven Rostedt

parent
8ed3e2cfe4
commit
e4f5d5440b
@@ -1683,7 +1683,7 @@ __ftrace_replace_code(struct dyn_ftrace *rec, int enable)
|
||||
return -1; /* unknow ftrace bug */
|
||||
}
|
||||
|
||||
static void ftrace_replace_code(int update)
|
||||
void __weak ftrace_replace_code(int enable)
|
||||
{
|
||||
struct dyn_ftrace *rec;
|
||||
struct ftrace_page *pg;
|
||||
@@ -1693,7 +1693,7 @@ static void ftrace_replace_code(int update)
|
||||
return;
|
||||
|
||||
do_for_each_ftrace_rec(pg, rec) {
|
||||
failed = __ftrace_replace_code(rec, update);
|
||||
failed = __ftrace_replace_code(rec, enable);
|
||||
if (failed) {
|
||||
ftrace_bug(failed, rec->ip);
|
||||
/* Stop processing */
|
||||
|
Reference in New Issue
Block a user