Messages in this thread Patch in this message | | | From | Masami Hiramatsu <> | Subject | [PATCH -tip v2 07/10] ia64: Add instruction_pointer_set() API | Date | Fri, 12 Mar 2021 15:43:01 +0900 |
| |
Add instruction_pointer_set() API for ia64.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> --- arch/ia64/include/asm/ptrace.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/arch/ia64/include/asm/ptrace.h b/arch/ia64/include/asm/ptrace.h index b3aa46090101..dbd9e85cbc77 100644 --- a/arch/ia64/include/asm/ptrace.h +++ b/arch/ia64/include/asm/ptrace.h @@ -71,6 +71,12 @@ static inline long regs_return_value(struct pt_regs *regs) return -regs->r8; } +static inline void instruction_pointer_set(struct pt_regs *regs, unsigned long val) +{ + ia64_psr(regs)->ri = (val & 0xf); + regs->cr_iip = (val & ~0xfULL); +} + /* Conserve space in histogram by encoding slot bits in address * bits 2 and 3 rather than bits 0 and 1. */
| |