summaryrefslogtreecommitdiffstats
path: root/arch/mips64/kernel/scall_64.S
diff options
context:
space:
mode:
authorUlf Carlsson <md1ulfc@mdstud.chalmers.se>2000-04-05 00:43:25 +0000
committerUlf Carlsson <md1ulfc@mdstud.chalmers.se>2000-04-05 00:43:25 +0000
commit687e82cd9a59b6a17e14bbe87c6f6ab299ff36ac (patch)
tree84603c565adc1fd399fd960de8c452a002cc66c0 /arch/mips64/kernel/scall_64.S
parent126175087baaa93ba67a3528db48cafc444d783a (diff)
o 32-bit ioctls (some at least)
o some syscalls o check that the syscall is withing range
Diffstat (limited to 'arch/mips64/kernel/scall_64.S')
-rw-r--r--arch/mips64/kernel/scall_64.S9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/mips64/kernel/scall_64.S b/arch/mips64/kernel/scall_64.S
index af3dd1d87..224f43378 100644
--- a/arch/mips64/kernel/scall_64.S
+++ b/arch/mips64/kernel/scall_64.S
@@ -22,9 +22,6 @@
/* This duplicates the definition from <asm/signal.h> */
#define SIGILL 4 /* Illegal instruction (ANSI). */
-/* Highest syscall handled here. */
-#define MAX_SYSCALL_NO __NR_Linux + __NR_Linux_syscalls
-
#ifndef CONFIG_MIPS32_COMPAT
#define handle_sys64 handle_sys
#endif
@@ -39,14 +36,14 @@ NESTED(handle_sys64, PT_SIZE, sp)
#endif
ld t1, PT_EPC(sp) # skip syscall on return
- sltiu t0, v0, MAX_SYSCALL_NO + 1 # check syscall number
+ subu t0, v0, __NR_Linux # check syscall number
+ sltiu t0, t0, __NR_Linux_syscalls + 1
daddiu t1, 4 # skip to next instruction
beqz t0, illegal_syscall
sd t1, PT_EPC(sp)
- dsll t0, v0, 3
+ dsll t0, v0, 3 # offset into table
ld t2, (sys_call_table - (__NR_Linux * 8))(t0) # syscall routine
- beqz t2, illegal_syscall;
sd a3, PT_R26(sp) # save a3 for syscall restarting