aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/scall64-o32.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/scall64-o32.S')
-rw-r--r--arch/mips/kernel/scall64-o32.S16
1 files changed, 7 insertions, 9 deletions
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 6c7ef8313ebd..fefef4af8595 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -174,14 +174,12 @@ not_o32_scall:
174 END(handle_sys) 174 END(handle_sys)
175 175
176LEAF(sys32_syscall) 176LEAF(sys32_syscall)
177 sltu v0, a0, __NR_O32_Linux + __NR_O32_Linux_syscalls + 1 177 subu t0, a0, __NR_O32_Linux # check syscall number
178 sltiu v0, t0, __NR_O32_Linux_syscalls + 1
179 beqz t0, einval # do not recurse
180 dsll t1, t0, 3
178 beqz v0, einval 181 beqz v0, einval
179 182 ld t2, sys_call_table(t1) # syscall routine
180 dsll v0, a0, 3
181 ld t2, (sys_call_table - (__NR_O32_Linux * 8))(v0)
182
183 li v1, 4000 # indirect syscall number
184 beq a0, v1, einval # do not recurse
185 183
186 move a0, a1 # shift argument registers 184 move a0, a1 # shift argument registers
187 move a1, a2 185 move a1, a2
@@ -198,7 +196,7 @@ LEAF(sys32_syscall)
198 jr t2 196 jr t2
199 /* Unreached */ 197 /* Unreached */
200 198
201einval: li v0, -EINVAL 199einval: li v0, -ENOSYS
202 jr ra 200 jr ra
203 END(sys32_syscall) 201 END(sys32_syscall)
204 202
@@ -512,7 +510,7 @@ sys_call_table:
512 PTR sys_splice 510 PTR sys_splice
513 PTR sys32_sync_file_range /* 4305 */ 511 PTR sys32_sync_file_range /* 4305 */
514 PTR sys_tee 512 PTR sys_tee
515 PTR sys_vmsplice 513 PTR compat_sys_vmsplice
516 PTR compat_sys_move_pages 514 PTR compat_sys_move_pages
517 PTR compat_sys_set_robust_list 515 PTR compat_sys_set_robust_list
518 PTR compat_sys_get_robust_list /* 4310 */ 516 PTR compat_sys_get_robust_list /* 4310 */