Mon Dec 14 18:39:19 2009 UTC ()
Wrap comment.


(skrll)
diff -r1.39 -r1.40 src/sys/arch/mips/mips/syscall.c

cvs diff -r1.39 -r1.40 src/sys/arch/mips/mips/syscall.c (expand / switch to unified diff)

--- src/sys/arch/mips/mips/syscall.c 2009/12/14 00:46:07 1.39
+++ src/sys/arch/mips/mips/syscall.c 2009/12/14 18:39:19 1.40
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: syscall.c,v 1.39 2009/12/14 00:46:07 matt Exp $ */ 1/* $NetBSD: syscall.c,v 1.40 2009/12/14 18:39:19 skrll Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc. 4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe and by Charles M. Hannum. 8 * by Jason R. Thorpe and by Charles M. Hannum.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -97,27 +97,27 @@ @@ -97,27 +97,27 @@
97 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 97 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
98 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 98 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
99 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 99 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
100 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 100 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
101 * SUCH DAMAGE. 101 * SUCH DAMAGE.
102 * 102 *
103 * from: Utah Hdr: trap.c 1.32 91/04/06 103 * from: Utah Hdr: trap.c 1.32 91/04/06
104 * 104 *
105 * @(#)trap.c 8.5 (Berkeley) 1/11/94 105 * @(#)trap.c 8.5 (Berkeley) 1/11/94
106 */ 106 */
107 107
108#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ 108#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
109 109
110__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.39 2009/12/14 00:46:07 matt Exp $"); 110__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.40 2009/12/14 18:39:19 skrll Exp $");
111 111
112#if defined(_KERNEL_OPT) 112#if defined(_KERNEL_OPT)
113#include "opt_sa.h" 113#include "opt_sa.h"
114#endif 114#endif
115 115
116#include <sys/param.h> 116#include <sys/param.h>
117#include <sys/systm.h> 117#include <sys/systm.h>
118#include <sys/endian.h> 118#include <sys/endian.h>
119#include <sys/proc.h> 119#include <sys/proc.h>
120#include <sys/signal.h> 120#include <sys/signal.h>
121#include <sys/syscall.h> 121#include <sys/syscall.h>
122#include <sys/syscallvar.h> 122#include <sys/syscallvar.h>
123#include <sys/sa.h> 123#include <sys/sa.h>
@@ -230,27 +230,28 @@ EMULNAME(syscall)(struct lwp *l, u_int s @@ -230,27 +230,28 @@ EMULNAME(syscall)(struct lwp *l, u_int s
230 if (abi != _MIPS_BSD_API_O32) { 230 if (abi != _MIPS_BSD_API_O32) {
231#endif 231#endif
232 CTASSERT(sizeof(copyargs[0]) == sizeof(fargs[0])); 232 CTASSERT(sizeof(copyargs[0]) == sizeof(fargs[0]));
233 if (nargs <= nregs) { 233 if (nargs <= nregs) {
234 /* 234 /*
235 * Just use the frame for the source of arguments 235 * Just use the frame for the source of arguments
236 */ 236 */
237 args = fargs; 237 args = fargs;
238 } else { 238 } else {
239 const size_t nsaved = _MIPS_SIM_NEWABI_P(abi) ? 0 : 4; 239 const size_t nsaved = _MIPS_SIM_NEWABI_P(abi) ? 0 : 4;
240 KASSERT(nargs <= __arraycount(copyargs)); 240 KASSERT(nargs <= __arraycount(copyargs));
241 args = copyargs; 241 args = copyargs;
242 /* 242 /*
243 * Copy the arguments passed via register from the * trap frame to our argument array 243 * Copy the arguments passed via register from the
 244 * trap frame to our argument array
244 */ 245 */
245 memcpy(copyargs, fargs, nregs * sizeof(register_t)); 246 memcpy(copyargs, fargs, nregs * sizeof(register_t));
246 /* 247 /*
247 * Start copying args skipping the register slots 248 * Start copying args skipping the register slots
248 * slots on the stack. 249 * slots on the stack.
249 */ 250 */
250 usp = frame->f_regs[_R_SP] + nsaved*sizeof(register_t); 251 usp = frame->f_regs[_R_SP] + nsaved*sizeof(register_t);
251 error = copyin((register_t *)usp, &copyargs[nregs], 252 error = copyin((register_t *)usp, &copyargs[nregs],
252 (nargs - nregs) * sizeof(copyargs[0])); 253 (nargs - nregs) * sizeof(copyargs[0]));
253 if (error) 254 if (error)
254 goto bad; 255 goto bad;
255 } 256 }
256#if !defined(__mips_o32) 257#if !defined(__mips_o32)