diff mbox series

[3/7] s390/tracing: pass ftrace_regs to function_graph_enter()

Message ID 20240904065908.1009086-4-svens@linux.ibm.com (mailing list archive)
State New
Delegated to: Masami Hiramatsu
Headers show
Series add function arguments to ftrace | expand

Commit Message

Sven Schnelle Sept. 4, 2024, 6:58 a.m. UTC
Will be used later to print function arguments in the function
graph tracer.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
---
 arch/s390/kernel/entry.h  | 4 +++-
 arch/s390/kernel/ftrace.c | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/arch/s390/kernel/entry.h b/arch/s390/kernel/entry.h
index 21969520f947..d0a5fbaad987 100644
--- a/arch/s390/kernel/entry.h
+++ b/arch/s390/kernel/entry.h
@@ -5,6 +5,7 @@ 
 #include <linux/percpu.h>
 #include <linux/types.h>
 #include <linux/signal.h>
+#include <linux/ftrace.h>
 #include <asm/extable.h>
 #include <asm/ptrace.h>
 #include <asm/idle.h>
@@ -41,7 +42,8 @@  void do_restart(void *arg);
 void __init startup_init(void);
 void die(struct pt_regs *regs, const char *str);
 int setup_profiling_timer(unsigned int multiplier);
-unsigned long prepare_ftrace_return(unsigned long parent, unsigned long sp, unsigned long ip);
+unsigned long prepare_ftrace_return(unsigned long parent, unsigned long sp, unsigned long ip,
+				    struct ftrace_regs *regs);
 
 struct s390_mmap_arg_struct;
 struct fadvise64_64_args;
diff --git a/arch/s390/kernel/ftrace.c b/arch/s390/kernel/ftrace.c
index cf9ee90ae216..dd77b656d9b9 100644
--- a/arch/s390/kernel/ftrace.c
+++ b/arch/s390/kernel/ftrace.c
@@ -266,14 +266,14 @@  void ftrace_arch_code_modify_post_process(void)
  * in current thread info.
  */
 unsigned long prepare_ftrace_return(unsigned long ra, unsigned long sp,
-				    unsigned long ip)
+				    unsigned long ip, struct ftrace_regs *regs)
 {
 	if (unlikely(ftrace_graph_is_dead()))
 		goto out;
 	if (unlikely(atomic_read(&current->tracing_graph_pause)))
 		goto out;
 	ip -= MCOUNT_INSN_SIZE;
-	if (!function_graph_enter(ra, ip, 0, (void *) sp, NULL))
+	if (!function_graph_enter(ra, ip, 0, (void *) sp, regs))
 		ra = (unsigned long) return_to_handler;
 out:
 	return ra;