diff options
author | Mike Frysinger <vapier.adi@gmail.com> | 2008-11-18 04:48:22 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-11-18 04:48:22 -0500 |
commit | 8a86176c4aee493bf8eb1dce8190b2f63d70d130 (patch) | |
tree | d3cb7aed2febad7d2c419e29ef7f04aa1b3978a3 /arch/blackfin/kernel | |
parent | 3c1fbd5184f9c3c52c0a392fae0efb0b0d99a079 (diff) |
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>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r-- | arch/blackfin/kernel/ptrace.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c index 4de44f387dd5..d5e6be2d5ed8 100644 --- a/arch/blackfin/kernel/ptrace.c +++ b/arch/blackfin/kernel/ptrace.c | |||
@@ -80,10 +80,12 @@ static inline struct pt_regs *get_user_regs(struct task_struct *task) | |||
80 | /* | 80 | /* |
81 | * Get all user integer registers. | 81 | * Get all user integer registers. |
82 | */ | 82 | */ |
83 | static inline int ptrace_getregs(struct task_struct *tsk, void __user * uregs) | 83 | static inline int ptrace_getregs(struct task_struct *tsk, void __user *uregs) |
84 | { | 84 | { |
85 | struct pt_regs *regs = get_user_regs(tsk); | 85 | struct pt_regs regs; |
86 | return copy_to_user(uregs, regs, sizeof(struct pt_regs)) ? -EFAULT : 0; | 86 | memcpy(®s, get_user_regs(tsk), sizeof(regs)); |
87 | regs.usp = tsk->thread.usp; | ||
88 | return copy_to_user(uregs, ®s, sizeof(struct pt_regs)) ? -EFAULT : 0; | ||
87 | } | 89 | } |
88 | 90 | ||
89 | /* Mapping from PT_xxx to the stack offset at which the register is | 91 | /* Mapping from PT_xxx to the stack offset at which the register is |