summaryrefslogtreecommitdiffstats
path: root/arch/mips64/kernel/scall_o32.S
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-01-16 01:44:34 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-01-16 01:44:34 +0000
commitd806c815018e95b2598f748d2f61a59599a494b0 (patch)
tree3c78fe76fe243e55e76a93491adaf9b2dae98115 /arch/mips64/kernel/scall_o32.S
parent774ad1f41925bc383eee80769c5985aa45aeaccf (diff)
Syscall handler fixes.
Diffstat (limited to 'arch/mips64/kernel/scall_o32.S')
-rw-r--r--arch/mips64/kernel/scall_o32.S13
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/mips64/kernel/scall_o32.S b/arch/mips64/kernel/scall_o32.S
index b417303c6..2899405f0 100644
--- a/arch/mips64/kernel/scall_o32.S
+++ b/arch/mips64/kernel/scall_o32.S
@@ -27,7 +27,7 @@
#define SIGILL 4 /* Illegal instruction (ANSI). */
/* Highest syscall used of any syscall flavour */
-#define MAX_SYSCALL_NO __NR_Linux32 + __NR_Linux_syscalls
+#define MAX_SYSCALL_NO __NR_Linux32 + __NR_Linux32_syscalls
.align 5
NESTED(handle_sys, PT_SIZE, sp)
@@ -35,6 +35,10 @@ NESTED(handle_sys, PT_SIZE, sp)
SAVE_SOME
STI
.set at
+ SAVE_ALL
+ ld a1, PT_R2(sp)
+ PRINT("Got syscall %d\n")
+ RESTORE_ALL
ld t1, PT_EPC(sp) # skip syscall on return
@@ -45,8 +49,8 @@ NESTED(handle_sys, PT_SIZE, sp)
/* XXX Put both in one cacheline, should save a bit. */
dsll t0, v0, 3
- ld t2, (sys_call_table - (__NR_Linux * 8))(t0) # syscall routine
- lbu t3, (sys_narg_table - __NR_Linux)(v0) # number of arguments
+ ld t2, (sys_call_table - (__NR_Linux32 * 8))(t0) # syscall routine
+ lbu t3, (sys_narg_table - __NR_Linux32)(v0) # number of arguments
beqz t2, illegal_syscall;
subu t0, t3, 5 # 5 or more arguments?
@@ -69,8 +73,7 @@ stack_done:
sd v0, PT_R0(sp) # set flag for syscall restarting
1: sd v0, PT_R2(sp) # result
-EXPORT(o32_ret_from_sys_call)
- .type o32_ret_from_sys_call,@function
+FEXPORT(o32_ret_from_sys_call)
ld t0,bh_mask
ld t1,bh_active # unused delay slot
and t0,t1