>From 3f7bbd84ff68df1af21c566bd8e18644fcc6a7c6 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Wed, 20 Oct 2021 16:40:39 +0200 Subject: [PATCH] samples: add HAVE_SAMPLE_FTRACE_MULTI_DIRECT config option Add HAVE_SAMPLE_FTRACE_MULTI_DIRECT config option which can be selected by architectures which have support for ftrace multi direct call samples. Link: https://lore.kernel.org/all/YXAqZ%2FEszRisunQw@osiris/ Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik --- arch/x86/Kconfig | 1 + samples/Kconfig | 3 +++ samples/Makefile | 1 + samples/ftrace/Makefile | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index cdeb7df21480..4bcebf18d546 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -193,6 +193,7 @@ config X86 select HAVE_DYNAMIC_FTRACE_WITH_ARGS if X86_64 select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS select HAVE_SAMPLE_FTRACE_DIRECT if X86_64 + select HAVE_SAMPLE_FTRACE_MULTI_DIRECT if X86_64 select HAVE_EBPF_JIT select HAVE_EFFICIENT_UNALIGNED_ACCESS select HAVE_EISA diff --git a/samples/Kconfig b/samples/Kconfig index 501f66309118..5518a3e62292 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -227,3 +227,6 @@ endif # SAMPLES config HAVE_SAMPLE_FTRACE_DIRECT bool + +config HAVE_SAMPLE_FTRACE_MULTI_DIRECT + bool diff --git a/samples/Makefile b/samples/Makefile index 087e0988ccc5..f06e59950193 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -21,6 +21,7 @@ subdir-$(CONFIG_SAMPLE_TIMER) += timers obj-$(CONFIG_SAMPLE_TRACE_EVENTS) += trace_events/ obj-$(CONFIG_SAMPLE_TRACE_PRINTK) += trace_printk/ obj-$(CONFIG_SAMPLE_FTRACE_DIRECT) += ftrace/ +obj-$(CONFIG_SAMPLE_FTRACE_MULTI_DIRECT) += ftrace/ obj-$(CONFIG_SAMPLE_TRACE_ARRAY) += ftrace/ subdir-$(CONFIG_SAMPLE_UHID) += uhid obj-$(CONFIG_VIDEO_PCI_SKELETON) += v4l/ diff --git a/samples/ftrace/Makefile b/samples/ftrace/Makefile index ab1d1c05c288..e8a3f8520a44 100644 --- a/samples/ftrace/Makefile +++ b/samples/ftrace/Makefile @@ -3,7 +3,7 @@ obj-$(CONFIG_SAMPLE_FTRACE_DIRECT) += ftrace-direct.o obj-$(CONFIG_SAMPLE_FTRACE_DIRECT) += ftrace-direct-too.o obj-$(CONFIG_SAMPLE_FTRACE_DIRECT) += ftrace-direct-modify.o -obj-$(CONFIG_SAMPLE_FTRACE_DIRECT) += ftrace-direct-multi.o +obj-$(CONFIG_SAMPLE_FTRACE_MULTI_DIRECT) += ftrace-direct-multi.o CFLAGS_sample-trace-array.o := -I$(src) obj-$(CONFIG_SAMPLE_TRACE_ARRAY) += sample-trace-array.o -- 2.25.4