summaryrefslogtreecommitdiffstats
path: root/lib/ratelimit.c
diff options
context:
space:
mode:
authorSong Shuai <suagrfillet@gmail.com>2023-11-30 13:15:30 +0100
committerPalmer Dabbelt <palmer@rivosinc.com>2024-01-17 18:17:09 -0800
commit196c79f19a92764d45005599f35338cf0a9eafbb (patch)
treed29441488a5f8f2db428abf1cb5deb6752d367ad /lib/ratelimit.c
parent35e61e8827ee8ea09e6093ab4d8ba45efd537e36 (diff)
downloadlinux-stable-196c79f19a92764d45005599f35338cf0a9eafbb.tar.gz
linux-stable-196c79f19a92764d45005599f35338cf0a9eafbb.tar.bz2
linux-stable-196c79f19a92764d45005599f35338cf0a9eafbb.zip
riscv: ftrace: Add DYNAMIC_FTRACE_WITH_DIRECT_CALLS support
Select the DYNAMIC_FTRACE_WITH_DIRECT_CALLS to provide the register_ftrace_direct[_multi] interfaces allowing users to register the customed trampoline (direct_caller) as the mcount for one or more target functions. And modify_ftrace_direct[_multi] are also provided for modifying direct_caller. To make the direct_caller and the other ftrace hooks (e.g. function/fgraph tracer, k[ret]probes) co-exist, a temporary register is nominated to store the address of direct_caller in ftrace_regs_caller. After the setting of the address direct_caller by direct_ops->func and the RESTORE_REGS in ftrace_regs_caller, direct_caller will be jumped to by the `jr` inst. Add DYNAMIC_FTRACE_WITH_DIRECT_CALLS support for RISC-V. Signed-off-by: Song Shuai <suagrfillet@gmail.com> Tested-by: Guo Ren <guoren@kernel.org> Signed-off-by: Guo Ren <guoren@kernel.org> Acked-by: Björn Töpel <bjorn@rivosinc.com> Link: https://lore.kernel.org/r/20231130121531.1178502-4-bjorn@kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'lib/ratelimit.c')
0 files changed, 0 insertions, 0 deletions