CVS commit: src/sys/compat/irix
Module Name:src Committed By: matt Date: Sun Feb 20 08:08:57 UTC 2011 Modified Files: src/sys/compat/irix: irix_exec.c irix_prctl.c irix_signal.c Log Message: Deal with mips trapframe changes. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/compat/irix/irix_exec.c cvs rdiff -u -r1.51 -r1.52 src/sys/compat/irix/irix_prctl.c cvs rdiff -u -r1.56 -r1.57 src/sys/compat/irix/irix_signal.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/compat/irix/irix_exec.c diff -u src/sys/compat/irix/irix_exec.c:1.58 src/sys/compat/irix/irix_exec.c:1.59 --- src/sys/compat/irix/irix_exec.c:1.58 Wed Jul 7 01:30:33 2010 +++ src/sys/compat/irix/irix_exec.c Sun Feb 20 08:08:57 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: irix_exec.c,v 1.58 2010/07/07 01:30:33 chs Exp $ */ +/* $NetBSD: irix_exec.c,v 1.59 2011/02/20 08:08:57 matt Exp $ */ /*- * Copyright (c) 2001-2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: irix_exec.c,v 1.58 2010/07/07 01:30:33 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: irix_exec.c,v 1.59 2011/02/20 08:08:57 matt Exp $); #ifdef _KERNEL_OPT #include opt_syscall_debug.h @@ -44,7 +44,9 @@ #include sys/types.h #include sys/malloc.h -#include machine/regnum.h +#include mips/locore.h +#include mips/regnum.h + #include uvm/uvm_extern.h #include compat/irix/irix_syscall.h @@ -123,12 +125,12 @@ void irix_n32_setregs(struct lwp *l, struct exec_package *pack, vaddr_t stack) { - struct frame *f = l-l_md.md_regs; + struct trapframe *tf = l-l_md.md_utf; /* Enable 64 bit instructions (eg: sd) */ - f-f_regs[_R_SR] |= MIPS3_SR_UX | MIPS3_SR_FR; + tf-tf_regs[_R_SR] |= MIPS3_SR_UX | MIPS3_SR_FR; #ifdef _LP64 - f-f_regs[_R_SR] |= MIPS3_SR_KX; + tf-tf_regs[_R_SR] |= MIPS3_SR_KX; #endif } Index: src/sys/compat/irix/irix_prctl.c diff -u src/sys/compat/irix/irix_prctl.c:1.51 src/sys/compat/irix/irix_prctl.c:1.52 --- src/sys/compat/irix/irix_prctl.c:1.51 Thu Jul 1 02:38:28 2010 +++ src/sys/compat/irix/irix_prctl.c Sun Feb 20 08:08:57 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: irix_prctl.c,v 1.51 2010/07/01 02:38:28 rmind Exp $ */ +/* $NetBSD: irix_prctl.c,v 1.52 2011/02/20 08:08:57 matt Exp $ */ /*- * Copyright (c) 2001-2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: irix_prctl.c,v 1.51 2010/07/01 02:38:28 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: irix_prctl.c,v 1.52 2011/02/20 08:08:57 matt Exp $); #include sys/errno.h #include sys/types.h @@ -50,6 +50,7 @@ #include uvm/uvm_extern.h #include uvm/uvm_map.h +#include mips/locore.h #include machine/regnum.h #include machine/vmparam.h @@ -400,8 +401,8 @@ int inh = isc-isc_inh; struct lwp *lparent = isc-isc_parent_lwp; struct proc *parent = lparent-l_proc; - struct frame *tf = (struct frame *)l2-l_md.md_regs; - struct frame *ptf = (struct frame *)lparent-l_md.md_regs; + struct trapframe *tf = l2-l_md.md_utf; + struct trapframe *ptf = lparent-l_md.md_utf; kauth_cred_t pc; struct irix_emuldata *ied; struct irix_emuldata *parent_ied; @@ -477,21 +478,21 @@ /* * Setup PC to return to the child entry point */ - tf-f_regs[_R_PC] = (unsigned long)isc-isc_entry; - tf-f_regs[_R_RA] = 0; + tf-tf_regs[_R_PC] = (unsigned long)isc-isc_entry; + tf-tf_regs[_R_RA] = 0; /* * Setup child arguments */ - tf-f_regs[_R_A0] = (unsigned long)isc-isc_arg; - tf-f_regs[_R_A1] = 0; - tf-f_regs[_R_A2] = 0; - tf-f_regs[_R_A3] = 0; - if (ptf-f_regs[_R_S3] == (unsigned long)isc-isc_len) { - tf-f_regs[_R_S0] = ptf-f_regs[_R_S0]; - tf-f_regs[_R_S1] = ptf-f_regs[_R_S1]; - tf-f_regs[_R_S2] = ptf-f_regs[_R_S2]; - tf-f_regs[_R_S3] = ptf-f_regs[_R_S3]; + tf-tf_regs[_R_A0] = (unsigned long)isc-isc_arg; + tf-tf_regs[_R_A1] = 0; + tf-tf_regs[_R_A2] = 0; + tf-tf_regs[_R_A3] = 0; + if (ptf-tf_regs[_R_S3] == (unsigned long)isc-isc_len) { + tf-tf_regs[_R_S0] = ptf-tf_regs[_R_S0]; + tf-tf_regs[_R_S1] = ptf-tf_regs[_R_S1]; + tf-tf_regs[_R_S2] = ptf-tf_regs[_R_S2]; + tf-tf_regs[_R_S3] = ptf-tf_regs[_R_S3]; } /* Index: src/sys/compat/irix/irix_signal.c diff -u src/sys/compat/irix/irix_signal.c:1.56 src/sys/compat/irix/irix_signal.c:1.57 --- src/sys/compat/irix/irix_signal.c:1.56 Thu Feb 3 21:45:31 2011 +++ src/sys/compat/irix/irix_signal.c Sun Feb 20 08:08:57 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: irix_signal.c,v 1.56 2011/02/03 21:45:31 joerg Exp $ */ +/* $NetBSD: irix_signal.c,v 1.57 2011/02/20 08:08:57 matt Exp $ */ /*- * Copyright (c) 1994, 2001-2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: irix_signal.c,v 1.56 2011/02/03 21:45:31 joerg Exp $); +__KERNEL_RCSID(0, $NetBSD: irix_signal.c,v 1.57 2011/02/20 08:08:57 matt Exp $); #include sys/types.h #include sys/signal.h @@ -44,9 +44,10 @@ #include sys/vnode.h #include sys/wait.h
CVS commit: src/sys/compat/irix
Module Name:src Committed By: yamt Date: Sun Jun 13 04:08:49 UTC 2010 Modified Files: src/sys/compat/irix: irix_exec.c Log Message: remove an unnecessary check of PK_MARKER To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/compat/irix/irix_exec.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/compat/irix/irix_exec.c diff -u src/sys/compat/irix/irix_exec.c:1.56 src/sys/compat/irix/irix_exec.c:1.57 --- src/sys/compat/irix/irix_exec.c:1.56 Mon Dec 14 00:47:10 2009 +++ src/sys/compat/irix/irix_exec.c Sun Jun 13 04:08:49 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: irix_exec.c,v 1.56 2009/12/14 00:47:10 matt Exp $ */ +/* $NetBSD: irix_exec.c,v 1.57 2010/06/13 04:08:49 yamt Exp $ */ /*- * Copyright (c) 2001-2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: irix_exec.c,v 1.56 2009/12/14 00:47:10 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: irix_exec.c,v 1.57 2010/06/13 04:08:49 yamt Exp $); #ifdef _KERNEL_OPT #include opt_syscall_debug.h @@ -190,8 +190,6 @@ */ mutex_enter(proc_lock); PROCLIST_FOREACH(pp, allproc) { - if ((pp-p_flag PK_MARKER) != 0) - continue; /* Select IRIX processes */ if (irix_check_exec(pp) == 0) continue;
CVS commit: src/sys/compat/irix
Module Name:src Committed By: dholland Date: Mon Feb 15 09:39:01 UTC 2010 Modified Files: src/sys/compat/irix: irix_signal.c Log Message: typo in comment To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/compat/irix/irix_signal.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/compat/irix/irix_signal.c diff -u src/sys/compat/irix/irix_signal.c:1.53 src/sys/compat/irix/irix_signal.c:1.54 --- src/sys/compat/irix/irix_signal.c:1.53 Mon Dec 14 00:47:10 2009 +++ src/sys/compat/irix/irix_signal.c Mon Feb 15 09:39:00 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: irix_signal.c,v 1.53 2009/12/14 00:47:10 matt Exp $ */ +/* $NetBSD: irix_signal.c,v 1.54 2010/02/15 09:39:00 dholland Exp $ */ /*- * Copyright (c) 1994, 2001-2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: irix_signal.c,v 1.53 2009/12/14 00:47:10 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: irix_signal.c,v 1.54 2010/02/15 09:39:00 dholland Exp $); #include sys/types.h #include sys/signal.h @@ -397,7 +397,7 @@ scp-isc_cause = f-f_regs[_R_CAUSE]; /* - * Save the floating-pointstate, if necessary, then copy it. + * Save the floating-point state, if necessary, then copy it. */ pcb = lwp_getpcb(l); #ifndef SOFTFLOAT @@ -449,7 +449,7 @@ ucp-iuc_mcontext.svr4___gregs[IRIX_CTX_CAUSE] = f-f_regs[_R_CAUSE]; /* - * Save the floating-pointstate, if necessary, then copy it. + * Save the floating-point state, if necessary, then copy it. */ pcb = lwp_getpcb(l); #ifndef SOFTFLOAT
CVS commit: src/sys/compat/irix
Module Name:src Committed By: dsl Date: Sat Nov 28 20:09:56 UTC 2009 Modified Files: src/sys/compat/irix: irix_sysmp.c Log Message: Set irm-bufmem = uvmexp.filepages; as suggested in PR/30408 To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/compat/irix/irix_sysmp.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/compat/irix/irix_sysmp.c diff -u src/sys/compat/irix/irix_sysmp.c:1.21 src/sys/compat/irix/irix_sysmp.c:1.22 --- src/sys/compat/irix/irix_sysmp.c:1.21 Mon Apr 28 20:23:42 2008 +++ src/sys/compat/irix/irix_sysmp.c Sat Nov 28 20:09:56 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: irix_sysmp.c,v 1.21 2008/04/28 20:23:42 martin Exp $ */ +/* $NetBSD: irix_sysmp.c,v 1.22 2009/11/28 20:09:56 dsl Exp $ */ /*- * Copyright (c) 2001-2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: irix_sysmp.c,v 1.21 2008/04/28 20:23:42 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: irix_sysmp.c,v 1.22 2009/11/28 20:09:56 dsl Exp $); #include sys/errno.h #include sys/param.h @@ -152,7 +152,6 @@ static int irix_sysmp_saget(int cmd, char *buf, size_t len) { - extern u_int bufpages; void *kbuf; int error = 0; @@ -169,7 +168,7 @@ irm-availsmem = uvmexp.free + active + inactive + uvmexp.wired + (uvmexp.swpages - uvmexp.swpgonly); irm-availrmem = uvmexp.free + active + inactive + uvmexp.wired; - irm-bufmem = bufpages; + irm-bufmem = uvmexp.filepages; irm-physmem = uvmexp.npages; irm-dchunkpages = 0; /* unsupported */ irm-pmapmem = 0; /* unsupported */
CVS commit: src/sys/compat/irix
Module Name:src Committed By: dholland Date: Mon Aug 31 05:34:16 UTC 2009 Modified Files: src/sys/compat/irix: irix_fcntl.c Log Message: Use uintptr_t instead of int when munging fcntl flags, which are pointer-sized integers. Now builds in a 64-bit world, might even work :-) To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/compat/irix/irix_fcntl.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/compat/irix/irix_fcntl.c diff -u src/sys/compat/irix/irix_fcntl.c:1.26 src/sys/compat/irix/irix_fcntl.c:1.27 --- src/sys/compat/irix/irix_fcntl.c:1.26 Sun Jun 28 09:50:57 2009 +++ src/sys/compat/irix/irix_fcntl.c Mon Aug 31 05:34:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: irix_fcntl.c,v 1.26 2009/06/28 09:50:57 tsutsui Exp $ */ +/* $NetBSD: irix_fcntl.c,v 1.27 2009/08/31 05:34:16 dholland Exp $ */ /*- * Copyright (c) 2001-2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: irix_fcntl.c,v 1.26 2009/06/28 09:50:57 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: irix_fcntl.c,v 1.27 2009/08/31 05:34:16 dholland Exp $); #include sys/types.h #include sys/signal.h @@ -62,8 +62,8 @@ #include compat/svr4/svr4_syscallargs.h static int fd_truncate(struct lwp *, int, int, off_t, register_t *); -static int bsd_to_irix_fcntl_flags(int); -static int irix_to_bsd_fcntl_flags(int); +static uintptr_t bsd_to_irix_fcntl_flags(uintptr_t); +static uintptr_t irix_to_bsd_fcntl_flags(uintptr_t); int irix_sys_lseek64(struct lwp *l, const struct irix_sys_lseek64_args *uap, register_t *retval) @@ -161,12 +161,12 @@ * All unsupported flags are silently ignored * except FDIRECT taht will return EINVAL */ - if ((int)SCARG(uap, arg) IRIX_FDIRECT) + if ((uintptr_t)SCARG(uap, arg) IRIX_FDIRECT) return EINVAL; SCARG(bsd_ua, fd) = SCARG(uap, fd); SCARG(bsd_ua, arg) = - (char *)irix_to_bsd_fcntl_flags((int)SCARG(uap, arg)); + (char *)irix_to_bsd_fcntl_flags((uintptr_t)SCARG(uap, arg)); SCARG(bsd_ua, cmd) = F_SETFL; return sys_fcntl(l, bsd_ua, retval); break; @@ -329,10 +329,10 @@ return 0; } -static int -irix_to_bsd_fcntl_flags(int flags) +static uintptr_t +irix_to_bsd_fcntl_flags(uintptr_t flags) { - int ret = 0; + uintptr_t ret = 0; if (flags IRIX_FNDELAY) ret |= FNDELAY; if (flags IRIX_FAPPEND) ret |= FAPPEND; @@ -355,10 +355,10 @@ return ret; } -static int -bsd_to_irix_fcntl_flags(int flags) +static uintptr_t +bsd_to_irix_fcntl_flags(uintptr_t flags) { - int ret = 0; + uintptr_t ret = 0; if (flags FNDELAY) ret |= IRIX_FNDELAY; if (flags FAPPEND) ret |= IRIX_FAPPEND;
CVS commit: src/sys/compat/irix
Module Name:src Committed By: dholland Date: Mon Aug 31 05:36:23 UTC 2009 Modified Files: src/sys/compat/irix: irix_kmem.c Log Message: Use uintptr_t instead of uint32_t as an intermediate stage when casting from off_t to a pointer. This way it compiles in a 64-bit world. Dunno if it'll work though with 64-bit mips kernel addresses, which are in the negative range of 64-bit off_t. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/compat/irix/irix_kmem.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/compat/irix/irix_kmem.c diff -u src/sys/compat/irix/irix_kmem.c:1.9 src/sys/compat/irix/irix_kmem.c:1.10 --- src/sys/compat/irix/irix_kmem.c:1.9 Sat Mar 14 21:04:18 2009 +++ src/sys/compat/irix/irix_kmem.c Mon Aug 31 05:36:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: irix_kmem.c,v 1.9 2009/03/14 21:04:18 dsl Exp $ */ +/* $NetBSD: irix_kmem.c,v 1.10 2009/08/31 05:36:23 dholland Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: irix_kmem.c,v 1.9 2009/03/14 21:04:18 dsl Exp $); +__KERNEL_RCSID(0, $NetBSD: irix_kmem.c,v 1.10 2009/08/31 05:36:23 dholland Exp $); #include sys/param.h #include sys/systm.h @@ -95,7 +95,7 @@ printf(irix_kmemread(): addr = %p\n, uio-uio_iov-iov_base); printf(irix_kmemread(): len = 0x%08lx\n, (long)uio-uio_iov-iov_len); #endif - offset = (void *)(uint32_t)uio-uio_offset; /* XXX */ + offset = (void *)(uintptr_t)uio-uio_offset; /* XXX */ if (offset == averunnable) { /* load average */ struct irix_loadavg iav; int scale = averunnable.fscale / IRIX_LOADAVG_SCALE;
CVS commit: src/sys/compat/irix
Module Name:src Committed By: tsutsui Date: Sun Jun 28 09:50:57 UTC 2009 Modified Files: src/sys/compat/irix: irix_fcntl.c Log Message: pad - PAD, to follow src/sys/kern/makesyscalls.sh rev 1.87. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/compat/irix/irix_fcntl.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/compat/irix/irix_fcntl.c diff -u src/sys/compat/irix/irix_fcntl.c:1.25 src/sys/compat/irix/irix_fcntl.c:1.26 --- src/sys/compat/irix/irix_fcntl.c:1.25 Mon Apr 28 20:23:41 2008 +++ src/sys/compat/irix/irix_fcntl.c Sun Jun 28 09:50:57 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: irix_fcntl.c,v 1.25 2008/04/28 20:23:41 martin Exp $ */ +/* $NetBSD: irix_fcntl.c,v 1.26 2009/06/28 09:50:57 tsutsui Exp $ */ /*- * Copyright (c) 2001-2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: irix_fcntl.c,v 1.25 2008/04/28 20:23:41 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: irix_fcntl.c,v 1.26 2009/06/28 09:50:57 tsutsui Exp $); #include sys/types.h #include sys/signal.h @@ -92,7 +92,7 @@ SCARG(uap, pad4)); #endif SCARG(cup, fd) = SCARG(uap, fd); - SCARG(cup, pad) = 0; + SCARG(cup, PAD) = 0; SCARG(cup, offset) = SCARG(uap, offset); SCARG(cup, whence) = SCARG(uap, whence);