ARC: gdbserver breakage in Big-Endian configuration #2
authorVineet Gupta <Vineet.Gupta1@synopsys.com>
Tue, 20 Aug 2013 08:08:11 +0000 (13:38 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2013 16:47:29 +0000 (09:47 -0700)
[Based on mainline commit 352c1d95e3220d0: "ARC: stop using
pt_regs->orig_r8"]

Stop using orig_r8 as it could get clobbered by ST in trap_with_param,
and further it is semantically not needed either.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arc/include/asm/syscall.h

index 33ab3048e9b20a6447475ec417b3fc10a91a309a..29de098043064a20112dd7ffd02f86059261ae44 100644 (file)
@@ -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