Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Acked-by: Steven 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.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Josh Poimboeuf and committed by
Ingo Molnar
e4a744ef e37e43a4

+9 -11
+1 -1
arch/arm64/kernel/entry-ftrace.S
··· 219 219 * 220 220 * Run ftrace_return_to_handler() before going back to parent. 221 221 * @fp is checked against the value passed by ftrace_graph_caller() 222 - * only when CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST is enabled. 222 + * only when HAVE_FUNCTION_GRAPH_FP_TEST is enabled. 223 223 */ 224 224 ENTRY(return_to_handler) 225 225 save_return_regs
+2 -2
arch/blackfin/kernel/ftrace-entry.S
··· 169 169 r0 = sp; /* unsigned long *parent */ 170 170 r1 = [sp]; /* unsigned long self_addr */ 171 171 # endif 172 - # ifdef CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST 172 + # ifdef HAVE_FUNCTION_GRAPH_FP_TEST 173 173 r2 = fp; /* unsigned long frame_pointer */ 174 174 # endif 175 175 r0 += 16; /* skip the 4 local regs on stack */ ··· 190 190 [--sp] = r1; 191 191 192 192 /* get original return address */ 193 - # ifdef CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST 193 + # ifdef HAVE_FUNCTION_GRAPH_FP_TEST 194 194 r0 = fp; /* Blackfin is sane, so omit this */ 195 195 # endif 196 196 call _ftrace_return_to_handler;
-1
arch/sparc/Kconfig
··· 56 56 def_bool 64BIT 57 57 select HAVE_FUNCTION_TRACER 58 58 select HAVE_FUNCTION_GRAPH_TRACER 59 - select HAVE_FUNCTION_GRAPH_FP_TEST 60 59 select HAVE_KRETPROBES 61 60 select HAVE_KPROBES 62 61 select HAVE_RCU_TABLE_FREE if SMP
+4
arch/sparc/include/asm/ftrace.h
··· 9 9 void _mcount(void); 10 10 #endif 11 11 12 + #endif /* CONFIG_MCOUNT */ 13 + 14 + #if defined(CONFIG_SPARC64) && !defined(CC_USE_FENTRY) 15 + #define HAVE_FUNCTION_GRAPH_FP_TEST 12 16 #endif 13 17 14 18 #ifdef CONFIG_DYNAMIC_FTRACE
-1
arch/x86/Kconfig
··· 111 111 select HAVE_EXIT_THREAD 112 112 select HAVE_FENTRY if X86_64 113 113 select HAVE_FTRACE_MCOUNT_RECORD 114 - select HAVE_FUNCTION_GRAPH_FP_TEST 115 114 select HAVE_FUNCTION_GRAPH_TRACER 116 115 select HAVE_FUNCTION_TRACER 117 116 select HAVE_GCC_PLUGINS
+1
arch/x86/include/asm/ftrace.h
··· 6 6 # define MCOUNT_ADDR ((unsigned long)(__fentry__)) 7 7 #else 8 8 # define MCOUNT_ADDR ((unsigned long)(mcount)) 9 + # define HAVE_FUNCTION_GRAPH_FP_TEST 9 10 #endif 10 11 #define MCOUNT_INSN_SIZE 5 /* sizeof mcount call */ 11 12
-5
kernel/trace/Kconfig
··· 24 24 help 25 25 See Documentation/trace/ftrace-design.txt 26 26 27 - config HAVE_FUNCTION_GRAPH_FP_TEST 28 - bool 29 - help 30 - See Documentation/trace/ftrace-design.txt 31 - 32 27 config HAVE_DYNAMIC_FTRACE 33 28 bool 34 29 help
+1 -1
kernel/trace/trace_functions_graph.c
··· 204 204 return; 205 205 } 206 206 207 - #if defined(CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST) && !defined(CC_USING_FENTRY) 207 + #ifdef HAVE_FUNCTION_GRAPH_FP_TEST 208 208 /* 209 209 * The arch may choose to record the frame pointer used 210 210 * and check it here to make sure that it is what we expect it