diff options
author | Steven Rostedt <srostedt@redhat.com> | 2012-04-27 09:13:18 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-05-16 20:00:27 -0400 |
commit | e4f5d5440bb860a3e8942ca8f7277a7f31798965 (patch) | |
tree | 324091109c5bbaae5a06e52a77369cf2731ebb54 /kernel/trace | |
parent | 8ed3e2cfe40ffe43630fd8efa34fc97c95b4c298 (diff) |
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>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/ftrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 3c345825cc23..a008663d86c8 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -1683,7 +1683,7 @@ __ftrace_replace_code(struct dyn_ftrace *rec, int enable) | |||
1683 | return -1; /* unknow ftrace bug */ | 1683 | return -1; /* unknow ftrace bug */ |
1684 | } | 1684 | } |
1685 | 1685 | ||
1686 | static void ftrace_replace_code(int update) | 1686 | void __weak ftrace_replace_code(int enable) |
1687 | { | 1687 | { |
1688 | struct dyn_ftrace *rec; | 1688 | struct dyn_ftrace *rec; |
1689 | struct ftrace_page *pg; | 1689 | struct ftrace_page *pg; |
@@ -1693,7 +1693,7 @@ static void ftrace_replace_code(int update) | |||
1693 | return; | 1693 | return; |
1694 | 1694 | ||
1695 | do_for_each_ftrace_rec(pg, rec) { | 1695 | do_for_each_ftrace_rec(pg, rec) { |
1696 | failed = __ftrace_replace_code(rec, update); | 1696 | failed = __ftrace_replace_code(rec, enable); |
1697 | if (failed) { | 1697 | if (failed) { |
1698 | ftrace_bug(failed, rec->ip); | 1698 | ftrace_bug(failed, rec->ip); |
1699 | /* Stop processing */ | 1699 | /* Stop processing */ |