aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/Makefile
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2018-08-06 15:17:47 +0200
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2018-08-15 22:39:53 -0400
commitd983c89cc96a87db0c00821e81aa3d8296c12225 (patch)
tree76e22e4f68f712b61d4ad485f89c9a2f877cd093 /arch/s390/Makefile
parenttracing: Add -mcount-nop option support (diff)
downloadlinux-dev-d983c89cc96a87db0c00821e81aa3d8296c12225.tar.xz
linux-dev-d983c89cc96a87db0c00821e81aa3d8296c12225.zip
s390/ftrace: Add -mfentry and -mnop-mcount support
Utilize -mfentry and -mnop-mcount gcc options together with -mrecord-mcount to get compiler generated calls to the profiling functions as nops which are compatible with current -mhotpatch=0,3 approach. At the same time -mrecord-mcount enables __mcount_loc section generation by the compiler which allows to avoid using scripts/recordmcount.pl script. Link: http://lkml.kernel.org/r/patch-4.thread-aa7b8d.git-aa7b8dbf236f.your-ad-here.call-01533557518-ext-9465@work.hours Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'arch/s390/Makefile')
-rw-r--r--arch/s390/Makefile16
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index 68a690442be0..8498babb5dad 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -86,13 +86,15 @@ ifdef CONFIG_EXPOLINE
endif
ifdef CONFIG_FUNCTION_TRACER
-# make use of hotpatch feature if the compiler supports it
-cc_hotpatch := -mhotpatch=0,3
-ifeq ($(call cc-option-yn,$(cc_hotpatch)),y)
-CC_FLAGS_FTRACE := $(cc_hotpatch)
-KBUILD_AFLAGS += -DCC_USING_HOTPATCH
-KBUILD_CFLAGS += -DCC_USING_HOTPATCH
-endif
+ ifeq ($(call cc-option-yn,-mfentry -mnop-mcount),n)
+ # make use of hotpatch feature if the compiler supports it
+ cc_hotpatch := -mhotpatch=0,3
+ ifeq ($(call cc-option-yn,$(cc_hotpatch)),y)
+ CC_FLAGS_FTRACE := $(cc_hotpatch)
+ KBUILD_AFLAGS += -DCC_USING_HOTPATCH
+ KBUILD_CFLAGS += -DCC_USING_HOTPATCH
+ endif
+ endif
endif
# Test CFI features of binutils