From: Heiko Carstens Date: Mon, 4 Oct 2021 14:10:24 +0000 (+0200) Subject: s390/ftrace: add HAVE_DYNAMIC_FTRACE_WITH_ARGS support X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5740a7c71ab6721863f7dcfc8ab96be00b0a4b58;p=linux.git s390/ftrace: add HAVE_DYNAMIC_FTRACE_WITH_ARGS support Add HAVE_DYNAMIC_FTRACE_WITH_ARGS support similar to commit 02a474ca266a ("ftrace/x86: Allow for arguments to be passed in to ftrace_regs by default"). s390's ftrace implementation always provides all registers with pt_regs, therefore this is trivial. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik --- diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 8ce2ee8ac88ed..03eb3ec08b071 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -153,6 +153,7 @@ config S390 select HAVE_DEBUG_KMEMLEAK select HAVE_DMA_CONTIGUOUS select HAVE_DYNAMIC_FTRACE + select HAVE_DYNAMIC_FTRACE_WITH_ARGS select HAVE_DYNAMIC_FTRACE_WITH_REGS select HAVE_EBPF_JIT if PACK_STACK && HAVE_MARCH_Z196_FEATURES select HAVE_EFFICIENT_UNALIGNED_ACCESS diff --git a/arch/s390/include/asm/ftrace.h b/arch/s390/include/asm/ftrace.h index d1841f4176be0..98c066cb347fa 100644 --- a/arch/s390/include/asm/ftrace.h +++ b/arch/s390/include/asm/ftrace.h @@ -42,6 +42,15 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr) return addr; } +struct ftrace_regs { + struct pt_regs regs; +}; + +static __always_inline struct pt_regs *arch_ftrace_get_regs(struct ftrace_regs *fregs) +{ + return &fregs->regs; +} + /* * Even though the system call numbers are identical for s390/s390x a * different system call table is used for compat tasks. This may lead