From 04a7052c8399edc95b5e120c980823ccaade6aaf Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 30 Nov 2005 16:24:57 +0000 Subject: [MIPS] Fix register handling in syscalls when debugging. Signed-off-by: Ralf Baechle --- arch/mips/kernel/scall32-o32.S | 4 +++- arch/mips/kernel/scall64-64.S | 4 +++- arch/mips/kernel/scall64-n32.S | 4 +++- arch/mips/kernel/scall64-o32.S | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) (limited to 'arch/mips') diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 2258fc69e14d..a42e0e8caa7b 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S @@ -94,11 +94,13 @@ syscall_trace_entry: li a1, 0 jal do_syscall_trace + move t0, s0 + RESTORE_STATIC lw a0, PT_R4(sp) # Restore argument registers lw a1, PT_R5(sp) lw a2, PT_R6(sp) lw a3, PT_R7(sp) - jalr s0 + jalr t0 li t0, -EMAXERRNO - 1 # error? sltu t0, t0, v0 diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index cb28de6a2efa..47bfbd416709 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S @@ -93,13 +93,15 @@ syscall_trace_entry: li a1, 0 jal do_syscall_trace + move t0, s0 + RESTORE_STATIC ld a0, PT_R4(sp) # Restore argument registers ld a1, PT_R5(sp) ld a2, PT_R6(sp) ld a3, PT_R7(sp) ld a4, PT_R8(sp) ld a5, PT_R9(sp) - jalr s0 + jalr t0 li t0, -EMAXERRNO - 1 # error? sltu t0, t0, v0 diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index 7e66eb823bf6..b465ced1758f 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S @@ -90,13 +90,15 @@ n32_syscall_trace_entry: li a1, 0 jal do_syscall_trace + move t0, s0 + RESTORE_STATIC ld a0, PT_R4(sp) # Restore argument registers ld a1, PT_R5(sp) ld a2, PT_R6(sp) ld a3, PT_R7(sp) ld a4, PT_R8(sp) ld a5, PT_R9(sp) - jalr s0 + jalr t0 li t0, -EMAXERRNO - 1 # error? sltu t0, t0, v0 diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 5a16401e443a..3d338ca7eeeb 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S @@ -124,6 +124,8 @@ trace_a_syscall: li a1, 0 jal do_syscall_trace + move t0, s0 + RESTORE_STATIC ld a0, PT_R4(sp) # Restore argument registers ld a1, PT_R5(sp) ld a2, PT_R6(sp) @@ -132,7 +134,7 @@ trace_a_syscall: ld a5, PT_R9(sp) ld a6, PT_R10(sp) ld a7, PT_R11(sp) # For indirect syscalls - jalr s0 + jalr t0 li t0, -EMAXERRNO - 1 # error? sltu t0, t0, v0 -- cgit v1.2.2