From: Christophe Leroy Date: Fri, 25 Jun 2021 11:13:17 +0000 (+0000) Subject: powerpc/ptrace: Refactor regs_set_return_{msr/ip} X-Git-Tag: v5.14-rc1~104^2~15 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=cae4644673ec5f54c77deab67a57c41395a1539f;p=linux-block.git 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 Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/baf64a91557d3811c155616a6aa23ed7b3b21da4.1624619582.git.christophe.leroy@csgroup.eu --- 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)