ftrace: Remove CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST from config
authorJosh Poimboeuf <jpoimboe@redhat.com>
Fri, 19 Aug 2016 11:52:55 +0000 (06:52 -0500)
committerIngo Molnar <mingo@kernel.org>
Wed, 24 Aug 2016 10:15:13 +0000 (12:15 +0200)
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>
arch/arm64/kernel/entry-ftrace.S
arch/blackfin/kernel/ftrace-entry.S
arch/sparc/Kconfig
arch/sparc/include/asm/ftrace.h
arch/x86/Kconfig
arch/x86/include/asm/ftrace.h
kernel/trace/Kconfig
kernel/trace/trace_functions_graph.c

index 0f03a8fe23144e777b3ead0a6ea18e038b5d1066..aef02d2af3b50db44476e887291b09c4056bf1c2 100644 (file)
@@ -219,7 +219,7 @@ ENDPROC(ftrace_graph_caller)
  *
  * Run ftrace_return_to_handler() before going back to parent.
  * @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)
        save_return_regs
index 28d059540424f5ac07ffae53e556d5d2c6f1393f..3b8bdcbb7da3e3235590ee86d681bd106a1ea8e9 100644 (file)
@@ -169,7 +169,7 @@ ENTRY(_ftrace_graph_caller)
        r0 = sp;        /* unsigned long *parent */
        r1 = [sp];      /* unsigned long self_addr */
 # endif
-# ifdef CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST
+# ifdef HAVE_FUNCTION_GRAPH_FP_TEST
        r2 = fp;        /* unsigned long frame_pointer */
 # endif
        r0 += 16;       /* skip the 4 local regs on stack */
@@ -190,7 +190,7 @@ ENTRY(_return_to_handler)
        [--sp] = r1;
 
        /* 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 */
 # endif
        call _ftrace_return_to_handler;
index 59b09600dd326b8d0e24853d720d18d73837cd69..f5d60f14a0bcf50ed87ba2c5a104c6e15f9f90be 100644 (file)
@@ -56,7 +56,6 @@ config SPARC64
        def_bool 64BIT
        select HAVE_FUNCTION_TRACER
        select HAVE_FUNCTION_GRAPH_TRACER
-       select HAVE_FUNCTION_GRAPH_FP_TEST
        select HAVE_KRETPROBES
        select HAVE_KPROBES
        select HAVE_RCU_TABLE_FREE if SMP
index 3192a8e42fd62c6f244a2b5ba5887da395847abd..62755a339a5932b96ddc42fd2a0eb8c3affb149b 100644 (file)
@@ -9,6 +9,10 @@
 void _mcount(void);
 #endif
 
+#endif /* CONFIG_MCOUNT */
+
+#if defined(CONFIG_SPARC64) && !defined(CC_USE_FENTRY)
+#define HAVE_FUNCTION_GRAPH_FP_TEST
 #endif
 
 #ifdef CONFIG_DYNAMIC_FTRACE
index 21a6d0ec59834f0eaa645891796e4c02019a649f..ce8860cccc34f52d4802c388853d65503438595c 100644 (file)
@@ -111,7 +111,6 @@ config X86
        select HAVE_EXIT_THREAD
        select HAVE_FENTRY                      if X86_64
        select HAVE_FTRACE_MCOUNT_RECORD
-       select HAVE_FUNCTION_GRAPH_FP_TEST
        select HAVE_FUNCTION_GRAPH_TRACER
        select HAVE_FUNCTION_TRACER
        select HAVE_GCC_PLUGINS
index a4820d4df617daede213516eea42becd5b874640..37f67cbba1c60c2dca302e28b00fedb6ed0c1ff2 100644 (file)
@@ -6,6 +6,7 @@
 # define MCOUNT_ADDR           ((unsigned long)(__fentry__))
 #else
 # define MCOUNT_ADDR           ((unsigned long)(mcount))
+# define HAVE_FUNCTION_GRAPH_FP_TEST
 #endif
 #define MCOUNT_INSN_SIZE       5 /* sizeof mcount call */
 
index f4b86e8ca1e77dba8d969aa009491876186f457f..ba3326785ca4cffcf245da527f0386b2d8c23608 100644 (file)
@@ -24,11 +24,6 @@ config HAVE_FUNCTION_GRAPH_TRACER
        help
          See Documentation/trace/ftrace-design.txt
 
-config HAVE_FUNCTION_GRAPH_FP_TEST
-       bool
-       help
-         See Documentation/trace/ftrace-design.txt
-
 config HAVE_DYNAMIC_FTRACE
        bool
        help
index 7363ccf795125ce14d89a3303300e47a096c877e..fc173cd9fbfd3a0aa24513f79ed817fc2b80b497 100644 (file)
@@ -204,7 +204,7 @@ ftrace_pop_return_trace(struct ftrace_graph_ret *trace, unsigned long *ret,
                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
         * and check it here to make sure that it is what we expect it