Commit e4a744ef authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Ingo Molnar

ftrace: Remove CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST from config

Make HAVE_FUNCTION_GRAPH_FP_TEST a normal define, independent from
kconfig.  This removes some config file pollution and simplifies the
checking for the fp test.
Suggested-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Byungchul Park <byungchul.park@lge.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nilay Vaish <nilayvaish@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/2c4e5f05054d6d367f702fd153af7a0109dd5c81.1471607358.git.jpoimboe@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent e37e43a4
...@@ -219,7 +219,7 @@ ENDPROC(ftrace_graph_caller) ...@@ -219,7 +219,7 @@ ENDPROC(ftrace_graph_caller)
* *
* Run ftrace_return_to_handler() before going back to parent. * Run ftrace_return_to_handler() before going back to parent.
* @fp is checked against the value passed by ftrace_graph_caller() * @fp is checked against the value passed by ftrace_graph_caller()
* only when CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST is enabled. * only when HAVE_FUNCTION_GRAPH_FP_TEST is enabled.
*/ */
ENTRY(return_to_handler) ENTRY(return_to_handler)
save_return_regs save_return_regs
......
...@@ -169,7 +169,7 @@ ENTRY(_ftrace_graph_caller) ...@@ -169,7 +169,7 @@ ENTRY(_ftrace_graph_caller)
r0 = sp; /* unsigned long *parent */ r0 = sp; /* unsigned long *parent */
r1 = [sp]; /* unsigned long self_addr */ r1 = [sp]; /* unsigned long self_addr */
# endif # endif
# ifdef CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST # ifdef HAVE_FUNCTION_GRAPH_FP_TEST
r2 = fp; /* unsigned long frame_pointer */ r2 = fp; /* unsigned long frame_pointer */
# endif # endif
r0 += 16; /* skip the 4 local regs on stack */ r0 += 16; /* skip the 4 local regs on stack */
...@@ -190,7 +190,7 @@ ENTRY(_return_to_handler) ...@@ -190,7 +190,7 @@ ENTRY(_return_to_handler)
[--sp] = r1; [--sp] = r1;
/* get original return address */ /* get original return address */
# ifdef CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST # ifdef HAVE_FUNCTION_GRAPH_FP_TEST
r0 = fp; /* Blackfin is sane, so omit this */ r0 = fp; /* Blackfin is sane, so omit this */
# endif # endif
call _ftrace_return_to_handler; call _ftrace_return_to_handler;
......
...@@ -56,7 +56,6 @@ config SPARC64 ...@@ -56,7 +56,6 @@ config SPARC64
def_bool 64BIT def_bool 64BIT
select HAVE_FUNCTION_TRACER select HAVE_FUNCTION_TRACER
select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_GRAPH_TRACER
select HAVE_FUNCTION_GRAPH_FP_TEST
select HAVE_KRETPROBES select HAVE_KRETPROBES
select HAVE_KPROBES select HAVE_KPROBES
select HAVE_RCU_TABLE_FREE if SMP select HAVE_RCU_TABLE_FREE if SMP
......
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
void _mcount(void); void _mcount(void);
#endif #endif
#endif /* CONFIG_MCOUNT */
#if defined(CONFIG_SPARC64) && !defined(CC_USE_FENTRY)
#define HAVE_FUNCTION_GRAPH_FP_TEST
#endif #endif
#ifdef CONFIG_DYNAMIC_FTRACE #ifdef CONFIG_DYNAMIC_FTRACE
......
...@@ -111,7 +111,6 @@ config X86 ...@@ -111,7 +111,6 @@ config X86
select HAVE_EXIT_THREAD select HAVE_EXIT_THREAD
select HAVE_FENTRY if X86_64 select HAVE_FENTRY if X86_64
select HAVE_FTRACE_MCOUNT_RECORD select HAVE_FTRACE_MCOUNT_RECORD
select HAVE_FUNCTION_GRAPH_FP_TEST
select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_GRAPH_TRACER
select HAVE_FUNCTION_TRACER select HAVE_FUNCTION_TRACER
select HAVE_GCC_PLUGINS select HAVE_GCC_PLUGINS
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
# define MCOUNT_ADDR ((unsigned long)(__fentry__)) # define MCOUNT_ADDR ((unsigned long)(__fentry__))
#else #else
# define MCOUNT_ADDR ((unsigned long)(mcount)) # define MCOUNT_ADDR ((unsigned long)(mcount))
# define HAVE_FUNCTION_GRAPH_FP_TEST
#endif #endif
#define MCOUNT_INSN_SIZE 5 /* sizeof mcount call */ #define MCOUNT_INSN_SIZE 5 /* sizeof mcount call */
......
...@@ -24,11 +24,6 @@ config HAVE_FUNCTION_GRAPH_TRACER ...@@ -24,11 +24,6 @@ config HAVE_FUNCTION_GRAPH_TRACER
help help
See Documentation/trace/ftrace-design.txt See Documentation/trace/ftrace-design.txt
config HAVE_FUNCTION_GRAPH_FP_TEST
bool
help
See Documentation/trace/ftrace-design.txt
config HAVE_DYNAMIC_FTRACE config HAVE_DYNAMIC_FTRACE
bool bool
help help
......
...@@ -204,7 +204,7 @@ ftrace_pop_return_trace(struct ftrace_graph_ret *trace, unsigned long *ret, ...@@ -204,7 +204,7 @@ ftrace_pop_return_trace(struct ftrace_graph_ret *trace, unsigned long *ret,
return; return;
} }
#if defined(CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST) && !defined(CC_USING_FENTRY) #ifdef HAVE_FUNCTION_GRAPH_FP_TEST
/* /*
* The arch may choose to record the frame pointer used * The arch may choose to record the frame pointer used
* and check it here to make sure that it is what we expect it * and check it here to make sure that it is what we expect it
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment