lkml.org 
[lkml]   [2021]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -tip v2 07/10] ia64: Add instruction_pointer_set() API
Date
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.
*/
\
 
 \ /
  Last update: 2021-03-12 07:44    [W:0.155 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site