aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-11-30 11:24:57 -0500
committerRalf Baechle <ralf@linux-mips.org>2005-12-01 06:05:17 -0500
commit04a7052c8399edc95b5e120c980823ccaade6aaf (patch)
tree230e75476b3d1fae60bfaf98d4e407d65b0be114 /arch
parentecd5a739048b4d94e4ae3545196eb752d6776c97 (diff)
[MIPS] Fix register handling in syscalls when debugging.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/kernel/scall32-o32.S4
-rw-r--r--arch/mips/kernel/scall64-64.S4
-rw-r--r--arch/mips/kernel/scall64-n32.S4
-rw-r--r--arch/mips/kernel/scall64-o32.S4
4 files changed, 12 insertions, 4 deletions
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:
94 li a1, 0 94 li a1, 0
95 jal do_syscall_trace 95 jal do_syscall_trace
96 96
97 move t0, s0
98 RESTORE_STATIC
97 lw a0, PT_R4(sp) # Restore argument registers 99 lw a0, PT_R4(sp) # Restore argument registers
98 lw a1, PT_R5(sp) 100 lw a1, PT_R5(sp)
99 lw a2, PT_R6(sp) 101 lw a2, PT_R6(sp)
100 lw a3, PT_R7(sp) 102 lw a3, PT_R7(sp)
101 jalr s0 103 jalr t0
102 104
103 li t0, -EMAXERRNO - 1 # error? 105 li t0, -EMAXERRNO - 1 # error?
104 sltu t0, t0, v0 106 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:
93 li a1, 0 93 li a1, 0
94 jal do_syscall_trace 94 jal do_syscall_trace
95 95
96 move t0, s0
97 RESTORE_STATIC
96 ld a0, PT_R4(sp) # Restore argument registers 98 ld a0, PT_R4(sp) # Restore argument registers
97 ld a1, PT_R5(sp) 99 ld a1, PT_R5(sp)
98 ld a2, PT_R6(sp) 100 ld a2, PT_R6(sp)
99 ld a3, PT_R7(sp) 101 ld a3, PT_R7(sp)
100 ld a4, PT_R8(sp) 102 ld a4, PT_R8(sp)
101 ld a5, PT_R9(sp) 103 ld a5, PT_R9(sp)
102 jalr s0 104 jalr t0
103 105
104 li t0, -EMAXERRNO - 1 # error? 106 li t0, -EMAXERRNO - 1 # error?
105 sltu t0, t0, v0 107 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:
90 li a1, 0 90 li a1, 0
91 jal do_syscall_trace 91 jal do_syscall_trace
92 92
93 move t0, s0
94 RESTORE_STATIC
93 ld a0, PT_R4(sp) # Restore argument registers 95 ld a0, PT_R4(sp) # Restore argument registers
94 ld a1, PT_R5(sp) 96 ld a1, PT_R5(sp)
95 ld a2, PT_R6(sp) 97 ld a2, PT_R6(sp)
96 ld a3, PT_R7(sp) 98 ld a3, PT_R7(sp)
97 ld a4, PT_R8(sp) 99 ld a4, PT_R8(sp)
98 ld a5, PT_R9(sp) 100 ld a5, PT_R9(sp)
99 jalr s0 101 jalr t0
100 102
101 li t0, -EMAXERRNO - 1 # error? 103 li t0, -EMAXERRNO - 1 # error?
102 sltu t0, t0, v0 104 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:
124 li a1, 0 124 li a1, 0
125 jal do_syscall_trace 125 jal do_syscall_trace
126 126
127 move t0, s0
128 RESTORE_STATIC
127 ld a0, PT_R4(sp) # Restore argument registers 129 ld a0, PT_R4(sp) # Restore argument registers
128 ld a1, PT_R5(sp) 130 ld a1, PT_R5(sp)
129 ld a2, PT_R6(sp) 131 ld a2, PT_R6(sp)
@@ -132,7 +134,7 @@ trace_a_syscall:
132 ld a5, PT_R9(sp) 134 ld a5, PT_R9(sp)
133 ld a6, PT_R10(sp) 135 ld a6, PT_R10(sp)
134 ld a7, PT_R11(sp) # For indirect syscalls 136 ld a7, PT_R11(sp) # For indirect syscalls
135 jalr s0 137 jalr t0
136 138
137 li t0, -EMAXERRNO - 1 # error? 139 li t0, -EMAXERRNO - 1 # error?
138 sltu t0, t0, v0 140 sltu t0, t0, v0