Skip to content

Commit 5874ca4

Browse files
Alexandre Ghitipalmer-dabbelt
authored andcommitted
riscv: Stop supporting static ftrace
Now that DYNAMIC_FTRACE was introduced, there is no need to support static ftrace as it is way less performant. This simplifies the code and prevents build failures as reported by kernel test robot when !DYNAMIC_FTRACE. Also make sure that FUNCTION_TRACER can only be selected if DYNAMIC_FTRACE is supported (we have a dependency on the toolchain). Co-developed-by: chenmiao <[email protected]> Signed-off-by: chenmiao <[email protected]> Fixes: b2137c3 ("riscv: ftrace: prepare ftrace for atomic code patching") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Alexandre Ghiti <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent b351018 commit 5874ca4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/riscv/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ config RISCV
9898
select CLONE_BACKWARDS
9999
select COMMON_CLK
100100
select CPU_PM if CPU_IDLE || HIBERNATION || SUSPEND
101+
select DYNAMIC_FTRACE if FUNCTION_TRACER
101102
select EDAC_SUPPORT
102103
select FRAME_POINTER if PERF_EVENTS || (FUNCTION_TRACER && !DYNAMIC_FTRACE)
103104
select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if DYNAMIC_FTRACE
@@ -162,7 +163,7 @@ config RISCV
162163
select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL
163164
select HAVE_FUNCTION_GRAPH_TRACER if HAVE_DYNAMIC_FTRACE_WITH_ARGS
164165
select HAVE_FUNCTION_GRAPH_FREGS
165-
select HAVE_FUNCTION_TRACER if !XIP_KERNEL
166+
select HAVE_FUNCTION_TRACER if !XIP_KERNEL && HAVE_DYNAMIC_FTRACE
166167
select HAVE_EBPF_JIT if MMU
167168
select HAVE_GUP_FAST if MMU
168169
select HAVE_FUNCTION_ARG_ACCESS_API

0 commit comments

Comments
 (0)