diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2013-06-22 09:08:59 +0200 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2013-06-22 15:53:26 +0200 |
commit | 352c1d95e3220d0ea33cefac5c1f0deb2c4470c6 (patch) | |
tree | 2e487e17b6c45610ae819e01be6a7a0f534c35e8 /arch/arc/include/asm/syscall.h | |
parent | ARC: pt_regs update #4: r25 saved/restored unconditionally (diff) | |
download | linux-352c1d95e3220d0ea33cefac5c1f0deb2c4470c6.tar.xz linux-352c1d95e3220d0ea33cefac5c1f0deb2c4470c6.zip |
ARC: stop using pt_regs->orig_r8
Historically, pt_regs have had orig_r8, an overloaded container for
(1) backup copy of r8 (syscall number Trap Exceptions)
(2) additional system state: (syscall/Exception/Interrupt)
There is no point in keeping (1) since syscall number is never clobbered
in-place, in pt_regs, unlike r0 which duals as first syscall arg as well
as syscall return value and in case of syscall restart, the orig arg0
needs restoring (from orig_r0) after having been updated in-place with
syscall ret value.
This further paves way to convert (2) to contain ECR itself (rather than
current madeup values)
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/include/asm/syscall.h')
-rw-r--r-- | arch/arc/include/asm/syscall.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arc/include/asm/syscall.h b/arch/arc/include/asm/syscall.h index 33ab3048e9b2..29de09804306 100644 --- a/arch/arc/include/asm/syscall.h +++ b/arch/arc/include/asm/syscall.h @@ -18,7 +18,7 @@ static inline long syscall_get_nr(struct task_struct *task, struct pt_regs *regs) { if (user_mode(regs) && in_syscall(regs)) - return regs->orig_r8; + return regs->r8; else return -1; } @@ -26,8 +26,7 @@ syscall_get_nr(struct task_struct *task, struct pt_regs *regs) static inline void syscall_rollback(struct task_struct *task, struct pt_regs *regs) { - /* XXX: I can't fathom how pt_regs->r8 will be clobbered ? */ - regs->r8 = regs->orig_r8; + regs->r0 = regs->orig_r0; } static inline long |