Blackfin arch: overlay thread.usp over PT_USP

overlay thread.usp over PT_USP when getting the whole regfile to
match PT_USP behavior

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
This commit is contained in:
Mike Frysinger 2008-11-18 17:48:22 +08:00 committed by Bryan Wu
parent 3c1fbd5184
commit 8a86176c4a

View File

@ -80,10 +80,12 @@ static inline struct pt_regs *get_user_regs(struct task_struct *task)
/* /*
* Get all user integer registers. * Get all user integer registers.
*/ */
static inline int ptrace_getregs(struct task_struct *tsk, void __user * uregs) static inline int ptrace_getregs(struct task_struct *tsk, void __user *uregs)
{ {
struct pt_regs *regs = get_user_regs(tsk); struct pt_regs regs;
return copy_to_user(uregs, regs, sizeof(struct pt_regs)) ? -EFAULT : 0; memcpy(&regs, get_user_regs(tsk), sizeof(regs));
regs.usp = tsk->thread.usp;
return copy_to_user(uregs, &regs, sizeof(struct pt_regs)) ? -EFAULT : 0;
} }
/* Mapping from PT_xxx to the stack offset at which the register is /* Mapping from PT_xxx to the stack offset at which the register is