Message ID | 20220916103817.9490-2-guoren@kernel.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | riscv: ftrace: Fixup ftrace detour code | expand |
Yes, by disabling preemption and ensuring all sub-functions called by the busy waiting loop of stop_machine, which happens to be true on non-preemptive kernels, solve the problem from the original implementation. Andy Chiu <andy.chiu@sifive.com>
Thanks! I would add your Signed-off-by: Andy Chiu <andy.chiu@sifive.com> as the first author, next. On Sat, Sep 17, 2022 at 9:32 AM Andy Chiu <andy.chiu@sifive.com> wrote: > > Yes, by disabling preemption and ensuring all sub-functions called by > the busy waiting loop of stop_machine, which happens to be true on > non-preemptive kernels, solve the problem from the original > implementation. > > Andy Chiu <andy.chiu@sifive.com>
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index ed66c31e4655..b3454c843932 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -272,7 +272,7 @@ config ARCH_RV64I select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL select HAVE_FUNCTION_GRAPH_TRACER - select HAVE_FUNCTION_TRACER if !XIP_KERNEL + select HAVE_FUNCTION_TRACER if !XIP_KERNEL && !PREEMPTION select SWIOTLB if MMU endchoice