kernel: ftrace: export ftrace_sync_ipi
authorAndy Chiu <andybnac@gmail.com>
Mon, 7 Apr 2025 18:08:28 +0000 (02:08 +0800)
committerPalmer Dabbelt <palmer@dabbelt.com>
Thu, 5 Jun 2025 18:09:24 +0000 (11:09 -0700)
commit500e626c4a5bf2fa7cc6f1cd6dd86c77b5b127f2
tree6010bc71870f8e0ad59579c2dcb0bd37802bcc19
parentc41bf4326c7b0af3f7004235ac91551833ec95c6
kernel: ftrace: export ftrace_sync_ipi

The following ftrace patch for riscv uses a data store to update ftrace
function. Therefore, a romote fence is required to order it against
function_trace_op updates. The mechanism is similar to the fence between
function_trace_op and update_ftrace_func in the generic ftrace, so we
leverage the same ftrace_sync_ipi function.

[ alex: Fix build warning when !CONFIG_DYNAMIC_FTRACE ]

Signed-off-by: Andy Chiu <andybnac@gmail.com>
Link: https://lore.kernel.org/r/20250407180838.42877-4-andybnac@gmail.com
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
include/linux/ftrace.h
kernel/trace/ftrace.c