Skip to content

Commit

Permalink
ia64: Add instruction_pointer_set() API
Browse files Browse the repository at this point in the history
Add instruction_pointer_set() API for ia64.

Link: https://lkml.kernel.org/r/163163051195.489837.1039597819838213481.stgit@devnote2

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
  • Loading branch information
Masami Hiramatsu authored and Steven Rostedt (VMware) committed Oct 1, 2021
1 parent bb6121b commit c1f76fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/ia64/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
* the canonical representation by adding to instruction pointer.
*/
# define instruction_pointer(regs) ((regs)->cr_iip + ia64_psr(regs)->ri)
# define instruction_pointer_set(regs, val) \
({ \
ia64_psr(regs)->ri = (val & 0xf); \
regs->cr_iip = (val & ~0xfULL); \
})

static inline unsigned long user_stack_pointer(struct pt_regs *regs)
{
Expand Down

0 comments on commit c1f76fe

Please sign in to comment.