summaryrefslogtreecommitdiff
path: root/kernel/trace/ftrace.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2024-02-19 16:58:41 +0000
committerMark Brown <broonie@kernel.org>2024-02-19 16:58:41 +0000
commitd68ce3aa8142333a96a071a9a0207f21c04e54cc (patch)
tree15754707ec571eb08c8d6308fe2459e46b8a5468 /kernel/trace/ftrace.c
parentec29a4d9b7c7329afc61e7932cb91e9b292b2b74 (diff)
parentb401b621758e46812da61fa58a67c3fd8d91de0d (diff)
regulator: Merge up v6.8-rc5
There are dependencies on the PWM fixes for some new work on the PWM driver.
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r--kernel/trace/ftrace.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index b01ae7d36021..83ba342aef31 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -5325,7 +5325,17 @@ static LIST_HEAD(ftrace_direct_funcs);
static int register_ftrace_function_nolock(struct ftrace_ops *ops);
+/*
+ * If there are multiple ftrace_ops, use SAVE_REGS by default, so that direct
+ * call will be jumped from ftrace_regs_caller. Only if the architecture does
+ * not support ftrace_regs_caller but direct_call, use SAVE_ARGS so that it
+ * jumps from ftrace_caller for multiple ftrace_ops.
+ */
+#ifndef CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS
#define MULTI_FLAGS (FTRACE_OPS_FL_DIRECT | FTRACE_OPS_FL_SAVE_ARGS)
+#else
+#define MULTI_FLAGS (FTRACE_OPS_FL_DIRECT | FTRACE_OPS_FL_SAVE_REGS)
+#endif
static int check_direct_multi(struct ftrace_ops *ops)
{