Commit 176510eb authored by Heiko Carstens's avatar Heiko Carstens Committed by Vasily Gorbik

s390/ftrace: add ftrace_instruction_pointer_set() helper function

Add ftrace_instruction_pointer_set() helper function to match x86.
See commit 2860cd8a ("livepatch: Use the default ftrace_ops
instead of REGS when ARGS is available").
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 5740a7c7
......@@ -51,6 +51,14 @@ static __always_inline struct pt_regs *arch_ftrace_get_regs(struct ftrace_regs *
return &fregs->regs;
}
static __always_inline void ftrace_instruction_pointer_set(struct ftrace_regs *fregs,
unsigned long ip)
{
struct pt_regs *regs = arch_ftrace_get_regs(fregs);
regs->psw.addr = ip;
}
/*
* Even though the system call numbers are identical for s390/s390x a
* different system call table is used for compat tasks. This may lead
......
......@@ -16,9 +16,7 @@
static inline void klp_arch_set_pc(struct ftrace_regs *fregs, unsigned long ip)
{
struct pt_regs *regs = ftrace_get_regs(fregs);
regs->psw.addr = ip;
ftrace_instruction_pointer_set(fregs, ip);
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment