From d806c815018e95b2598f748d2f61a59599a494b0 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sun, 16 Jan 2000 01:44:34 +0000 Subject: Syscall handler fixes. --- arch/mips64/kernel/scall_64.S | 7 +------ arch/mips64/kernel/scall_o32.S | 13 ++++++++----- 2 files changed, 9 insertions(+), 11 deletions(-) (limited to 'arch/mips64') 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 -- cgit v1.2.3