summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2021-06-25 11:13:17 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2021-06-26 00:12:39 +1000
commitcae4644673ec5f54c77deab67a57c41395a1539f (patch)
tree81bb8f8a15ac96a4ba4cd7267556af0a23261aa4 /arch/powerpc
parent5f0f95f1e1b64fe55679059837dafb3439b57012 (diff)
downloadlwn-cae4644673ec5f54c77deab67a57c41395a1539f.tar.gz
lwn-cae4644673ec5f54c77deab67a57c41395a1539f.zip
powerpc/ptrace: Refactor regs_set_return_{msr/ip}
regs_set_return_msr() and regs_set_return_ip() have a copy of the code of set_return_regs_changed(). Call the later instead. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/baf64a91557d3811c155616a6aa23ed7b3b21da4.1624619582.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/include/asm/ptrace.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h
index 14b8105a1e27..3e5d470a6155 100644
--- a/arch/powerpc/include/asm/ptrace.h
+++ b/arch/powerpc/include/asm/ptrace.h
@@ -146,19 +146,13 @@ static inline void set_return_regs_changed(void)
static inline void regs_set_return_ip(struct pt_regs *regs, unsigned long ip)
{
regs->nip = ip;
-#ifdef CONFIG_PPC_BOOK3S_64
- local_paca->hsrr_valid = 0;
- local_paca->srr_valid = 0;
-#endif
+ set_return_regs_changed();
}
static inline void regs_set_return_msr(struct pt_regs *regs, unsigned long msr)
{
regs->msr = msr;
-#ifdef CONFIG_PPC_BOOK3S_64
- local_paca->hsrr_valid = 0;
- local_paca->srr_valid = 0;
-#endif
+ set_return_regs_changed();
}
static inline void regs_add_return_ip(struct pt_regs *regs, long offset)