Module Name: src
Committed By: matt
Date: Wed Jun 26 08:38:03 UTC 2013
Modified Files:
src/sys/arch/mips/mips: syscall.c
Log Message:
Use sy_invoke
To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/mips/mips/syscall.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/mips/mips/syscall.c
diff -u src/sys/arch/mips/mips/syscall.c:1.47 src/sys/arch/mips/mips/syscall.c:1.48
--- src/sys/arch/mips/mips/syscall.c:1.47 Sun Feb 19 21:06:19 2012
+++ src/sys/arch/mips/mips/syscall.c Wed Jun 26 08:38:03 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: syscall.c,v 1.47 2012/02/19 21:06:19 rmind Exp $ */
+/* $NetBSD: syscall.c,v 1.48 2013/06/26 08:38:03 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.47 2012/02/19 21:06:19 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.48 2013/06/26 08:38:03 matt Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -122,7 +122,6 @@ EMULNAME(syscall)(struct lwp *l, u_int s
mips_reg_t *fargs = ®->r_regs[_R_A0];
register_t *args = NULL;
register_t copyargs[2+SYS_MAXSYSARGS];
- mips_reg_t saved_v0;
vaddr_t usp;
size_t nargs;
const struct sysent *callp;
@@ -149,9 +148,8 @@ EMULNAME(syscall)(struct lwp *l, u_int s
reg->r_regs[_R_PC] = pc + sizeof(uint32_t);
callp = p->p_emul->e_sysent;
- saved_v0 = code = reg->r_regs[_R_V0];
-
- code -= SYSCALL_SHIFT;
+ const mips_reg_t saved_v0 = reg->r_regs[_R_V0];
+ code = saved_v0 - SYSCALL_SHIFT;
if (code == SYS_syscall
|| (code == SYS___syscall && abi != _MIPS_BSD_API_O32)) {
@@ -176,7 +174,6 @@ EMULNAME(syscall)(struct lwp *l, u_int s
callp += code;
nargs = callp->sy_narg;
- reg->r_regs[_R_V0] = 0;
#if !defined(__mips_o32)
if (abi != _MIPS_BSD_API_O32) {
#endif
@@ -316,13 +313,8 @@ EMULNAME(syscall)(struct lwp *l, u_int s
printf("\n");
#endif
- if (__predict_false(p->p_trace_enabled)
- && (error = trace_enter(code, args, nargs)) != 0)
- goto out;
-
- error = (*callp->sy_call)(l, args, ®->r_regs[_R_V0]);
+ error = sy_invoke(callp, l, args, ®->r_regs[_R_V0], code);
- out:
switch (error) {
case 0:
#if !defined(__mips_o32)
@@ -368,9 +360,6 @@ EMULNAME(syscall)(struct lwp *l, u_int s
break;
}
- if (__predict_false(p->p_trace_enabled))
- trace_exit(code, ®->r_regs[_R_V0], error);
-
KASSERT(l->l_blcnt == 0);
KASSERT(curcpu()->ci_biglock_count == 0);