ARC: Add instruction_pointer_set() API
authorMasami Hiramatsu <mhiramat@kernel.org>
Tue, 14 Sep 2021 14:41:41 +0000 (23:41 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 1 Oct 2021 01:24:07 +0000 (21:24 -0400)
Add instruction_pointer_set() API for arc.

Link: https://lkml.kernel.org/r/163163050148.489837.15187799269793560256.stgit@devnote2
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
arch/arc/include/asm/ptrace.h

index 4c3c9be5bd168a861b17ceadd26668dc65a3dfca..cca8d6583e3104bac15b90ef10663e0c1d34fd79 100644 (file)
@@ -149,6 +149,11 @@ static inline long regs_return_value(struct pt_regs *regs)
        return (long)regs->r0;
 }
 
+static inline void instruction_pointer_set(struct pt_regs *regs,
+                                          unsigned long val)
+{
+       instruction_pointer(regs) = val;
+}
 #endif /* !__ASSEMBLY__ */
 
 #endif /* __ASM_PTRACE_H */