mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-08 04:09:37 +00:00
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
This commit is contained in:
parent
5f0f95f1e1
commit
cae4644673
@ -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)
|
static inline void regs_set_return_ip(struct pt_regs *regs, unsigned long ip)
|
||||||
{
|
{
|
||||||
regs->nip = ip;
|
regs->nip = ip;
|
||||||
#ifdef CONFIG_PPC_BOOK3S_64
|
set_return_regs_changed();
|
||||||
local_paca->hsrr_valid = 0;
|
|
||||||
local_paca->srr_valid = 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void regs_set_return_msr(struct pt_regs *regs, unsigned long msr)
|
static inline void regs_set_return_msr(struct pt_regs *regs, unsigned long msr)
|
||||||
{
|
{
|
||||||
regs->msr = msr;
|
regs->msr = msr;
|
||||||
#ifdef CONFIG_PPC_BOOK3S_64
|
set_return_regs_changed();
|
||||||
local_paca->hsrr_valid = 0;
|
|
||||||
local_paca->srr_valid = 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void regs_add_return_ip(struct pt_regs *regs, long offset)
|
static inline void regs_add_return_ip(struct pt_regs *regs, long offset)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user