summaryrefslogtreecommitdiffstats
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
parent774ad1f41925bc383eee80769c5985aa45aeaccf (diff)
Syscall handler fixes.
-rw-r--r--arch/mips64/kernel/scall_64.S7
-rw-r--r--arch/mips64/kernel/scall_o32.S13
-rw-r--r--include/asm-mips64/unistd.h4
3 files changed, 11 insertions, 13 deletions
diff --git a/arch/mips64/kernel/scall_64.S b/arch/mips64/kernel/scall_64.S
index 5167c344d..27ce842e9 100644
--- a/arch/mips64/kernel/scall_64.S
+++ b/arch/mips64/kernel/scall_64.S
@@ -1,4 +1,4 @@
-/* $Id: scall_64.S,v 1.1 1999/11/24 13:14:34 ralf Exp $
+/* $Id: scall_64.S,v 1.2 1999/12/21 12:35:22 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -26,10 +26,6 @@
.align 5
NESTED(handle_sys64, PT_SIZE, sp)
- .set noat
- SAVE_SOME
- STI
- .set at
ld t1, PT_EPC(sp) # skip syscall on return
@@ -38,7 +34,6 @@ NESTED(handle_sys64, PT_SIZE, sp)
beqz t0, illegal_syscall
sd t1, PT_EPC(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
beqz t2, illegal_syscall;
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
diff --git a/include/asm-mips64/unistd.h b/include/asm-mips64/unistd.h
index 4793d8864..71b27faaa 100644
--- a/include/asm-mips64/unistd.h
+++ b/include/asm-mips64/unistd.h
@@ -1,4 +1,4 @@
-/* $Id: unistd.h,v 1.4 1999/10/09 00:01:43 ralf Exp $
+/* $Id: unistd.h,v 1.5 1999/12/04 03:59:12 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -1199,7 +1199,7 @@
/*
* Offset of the last Linux o32 flavoured syscall
*/
-#define __NR_Linux_syscalls 209
+#define __NR_Linux32_syscalls 209
/*
* Linux 64-bit syscalls are in the range from 5000 to 5999.