@@ -45,6 +45,7 @@ config FRAME_POINTER_VALIDATION
bool "Dynamic Frame pointer validation"
select UNWINDER_FRAME_POINTER
select UNWINDER_ORC
+ select HAVE_DYNAMIC_FTRACE_WITH_ARGS
help
This invokes objtool on every object file causing it to
generate ORC data for the object file. ORC data is in a custom
@@ -78,6 +78,26 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr)
return addr;
}
+#ifdef CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS
+
+struct ftrace_regs {
+ struct pt_regs regs;
+};
+
+static __always_inline struct pt_regs *
+arch_ftrace_get_regs(struct ftrace_regs *fregs)
+{
+ return &fregs->regs;
+}
+
+static __always_inline void ftrace_instruction_pointer_set(
+ struct ftrace_regs *fregs, unsigned long pc)
+{
+ fregs->regs.pc = pc;
+}
+
+#endif
+
#ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS
struct dyn_ftrace;
struct ftrace_ops;