Message ID | f2aa621d26056aa9fc8a6b82e3ceeaf44201d86d.1558115654.git.naveen.n.rao@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Nop out the preceding mflr with -mprofile-kernel | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch next (8150a153c013aa2dd1ffae43370b89ac1347a7fb) |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 22 lines checked |
On Sat, 18 May 2019 00:32:45 +0530 "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote: > Since ftrace_replace_code() is a __weak function and can be overridden, > we need to expose the flags that can be set. So, move the flags enum to > the header file. > > Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org> -- Steve > --- > include/linux/ftrace.h | 5 +++++ > kernel/trace/ftrace.c | 5 ----- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h > index 20899919ead8..835e761f63b0 100644 > --- a/include/linux/ftrace.h > +++ b/include/linux/ftrace.h > @@ -162,6 +162,11 @@ enum { > FTRACE_OPS_FL_TRACE_ARRAY = 1 << 15, > }; > > +enum { > + FTRACE_MODIFY_ENABLE_FL = (1 << 0), > + FTRACE_MODIFY_MAY_SLEEP_FL = (1 << 1), > +}; > + > #ifdef CONFIG_DYNAMIC_FTRACE > /* The hash used to know what functions callbacks trace */ > struct ftrace_ops_hash { > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > index b920358dd8f7..38c15cd27fc4 100644 > --- a/kernel/trace/ftrace.c > +++ b/kernel/trace/ftrace.c > @@ -78,11 +78,6 @@ > #define ASSIGN_OPS_HASH(opsname, val) > #endif > > -enum { > - FTRACE_MODIFY_ENABLE_FL = (1 << 0), > - FTRACE_MODIFY_MAY_SLEEP_FL = (1 << 1), > -}; > - > struct ftrace_ops ftrace_list_end __read_mostly = { > .func = ftrace_stub, > .flags = FTRACE_OPS_FL_RECURSION_SAFE | FTRACE_OPS_FL_STUB,
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 20899919ead8..835e761f63b0 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -162,6 +162,11 @@ enum { FTRACE_OPS_FL_TRACE_ARRAY = 1 << 15, }; +enum { + FTRACE_MODIFY_ENABLE_FL = (1 << 0), + FTRACE_MODIFY_MAY_SLEEP_FL = (1 << 1), +}; + #ifdef CONFIG_DYNAMIC_FTRACE /* The hash used to know what functions callbacks trace */ struct ftrace_ops_hash { diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index b920358dd8f7..38c15cd27fc4 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -78,11 +78,6 @@ #define ASSIGN_OPS_HASH(opsname, val) #endif -enum { - FTRACE_MODIFY_ENABLE_FL = (1 << 0), - FTRACE_MODIFY_MAY_SLEEP_FL = (1 << 1), -}; - struct ftrace_ops ftrace_list_end __read_mostly = { .func = ftrace_stub, .flags = FTRACE_OPS_FL_RECURSION_SAFE | FTRACE_OPS_FL_STUB,
Since ftrace_replace_code() is a __weak function and can be overridden, we need to expose the flags that can be set. So, move the flags enum to the header file. Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> --- include/linux/ftrace.h | 5 +++++ kernel/trace/ftrace.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-)