[PATCH -tip v4 07/12] ia64: Add instruction_pointer_set() API
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Steven Rostedt <rostedt@xxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>
- Subject: [PATCH -tip v4 07/12] ia64: Add instruction_pointer_set() API
- From: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
- Date: Mon, 22 Mar 2021 15:41:07 +0900
- Cc: X86 ML <x86@xxxxxxxxxx>, Masami Hiramatsu <mhiramat@xxxxxxxxxx>, Daniel Xu <dxu@xxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, kuba@xxxxxxxxxx, mingo@xxxxxxxxxx, ast@xxxxxxxxxx, tglx@xxxxxxxxxxxxx, kernel-team@xxxxxx, yhs@xxxxxx, Josh Poimboeuf <jpoimboe@xxxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, Abhishek Sagar <sagar.abhishek@xxxxxxxxx>
- In-reply-to: <161639518354.895304.15627519393073806809.stgit@devnote2>
- References: <161639518354.895304.15627519393073806809.stgit@devnote2>
- User-agent: StGit/0.19
Add instruction_pointer_set() API for ia64.
Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
---
Changes in v4:
- Make the API macro for avoiding a build error.
---
arch/ia64/include/asm/ptrace.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/ia64/include/asm/ptrace.h b/arch/ia64/include/asm/ptrace.h
index b3aa46090101..4c2f838b2e77 100644
--- a/arch/ia64/include/asm/ptrace.h
+++ b/arch/ia64/include/asm/ptrace.h
@@ -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)
{
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]