Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
This commit is contained in:
rmind 2009-10-21 21:11:57 +00:00
parent 43f47d3c56
commit 40cf6f3659
143 changed files with 528 additions and 1981 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: keyword.c,v 1.52 2008/02/10 17:47:59 christos Exp $ */
/* $NetBSD: keyword.c,v 1.53 2009/10/21 21:11:57 rmind Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)keyword.c 8.5 (Berkeley) 4/2/94";
#else
__RCSID("$NetBSD: keyword.c,v 1.52 2008/02/10 17:47:59 christos Exp $");
__RCSID("$NetBSD: keyword.c,v 1.53 2009/10/21 21:11:57 rmind Exp $");
#endif
#endif /* not lint */
@ -133,6 +133,7 @@ VAR var[] = {
VAR4("group", "GROUP", LJUST, gname),
VAR4("groupnames", "GROUPNAMES", LJUST, groupnames),
VAR4("groups", "GROUPS", LJUST, groups),
/* holdcnt: unused, left for compat. */
LVAR("holdcnt", "HOLDCNT", 0, l_holdcnt, INT, "d"),
VAR3("ignored", "sigignore", ALIAS),
PUVAR("inblk", "INBLK", 0, p_uru_inblock, UINT64, PRIu64),
@ -158,6 +159,7 @@ VAR var[] = {
PVAR("nlwp", "NLWP", 0, p_nlwps, UINT64, PRId64),
VAR3("nsignals", "nsigs", ALIAS),
PUVAR("nsigs", "NSIGS", 0, p_uru_nsignals, UINT64, PRIu64),
/* nswap: unused, left for compat. */
PUVAR("nswap", "NSWAP", 0, p_uru_nswap, UINT64, PRIu64),
PUVAR("nvcsw", "NVCSW", 0, p_uru_nvcsw, UINT64, PRIu64),
/*XXX*/ LVAR("nwchan", "WCHAN", 0, l_wchan, KPTR, PRIx64),

View File

@ -1,4 +1,4 @@
/* $NetBSD: print.c,v 1.111 2009/03/29 01:02:49 mrg Exp $ */
/* $NetBSD: print.c,v 1.112 2009/10/21 21:11:57 rmind Exp $ */
/*
* Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
@ -63,7 +63,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94";
#else
__RCSID("$NetBSD: print.c,v 1.111 2009/03/29 01:02:49 mrg Exp $");
__RCSID("$NetBSD: print.c,v 1.112 2009/10/21 21:11:57 rmind Exp $");
#endif
#endif /* not lint */
@ -483,6 +483,16 @@ state(void *arg, VARENT *ve, int mode)
flag = k->p_flag;
cp = buf;
/*
* NOTE: There are historical letters, which are no longer used:
*
* - W: indicated that process is swapped out.
* - L: indicated non-zero l_holdcnt (i.e. that process was
* prevented from swapping-out.
*
* These letters should not be used for new states to avoid
* conflicts with old applications which might depend on them.
*/
switch (k->p_stat) {
case LSSTOP:
@ -518,9 +528,6 @@ state(void *arg, VARENT *ve, int mode)
*cp = '?';
}
cp++;
if (flag & L_INMEM) {
} else
*cp++ = 'W';
if (k->p_nice < NZERO)
*cp++ = '<';
else if (k->p_nice > NZERO)
@ -533,9 +540,6 @@ state(void *arg, VARENT *ve, int mode)
*cp++ = 'V';
if (flag & P_SYSTEM)
*cp++ = 'K';
/* system process might have this too, don't need to double up */
else if (k->p_holdcnt)
*cp++ = 'L';
if (k->p_eflag & EPROC_SLEADER)
*cp++ = 's';
if (flag & P_SA)
@ -596,11 +600,6 @@ lstate(void *arg, VARENT *ve, int mode)
*cp = '?';
}
cp++;
if (flag & L_INMEM) {
} else
*cp++ = 'W';
if (k->l_holdcnt)
*cp++ = 'L';
if (flag & L_DETACHED)
*cp++ = '-';
*cp = '\0';
@ -1110,9 +1109,7 @@ getpcpu(k)
#define fxtofl(fixpt) ((double)(fixpt) / fscale)
/* XXX - I don't like this */
if (k->p_swtime == 0 || (k->p_flag & L_INMEM) == 0 ||
k->p_realstat == SZOMB)
if (k->p_swtime == 0 || k->p_realstat == SZOMB)
return (0.0);
if (rawcpu)
return (100.0 * fxtofl(k->p_pctcpu));
@ -1144,8 +1141,6 @@ getpmem(k)
if (failure)
return (0.0);
if ((k->p_flag & L_INMEM) == 0)
return (0.0);
/* XXX want pmap ptpages, segtab, etc. (per architecture) */
szptudot = uspace/getpagesize();
/* XXX don't have info about shared */

View File

@ -1,4 +1,4 @@
.\" $NetBSD: ps.1,v 1.89 2009/08/03 22:22:10 wiz Exp $
.\" $NetBSD: ps.1,v 1.90 2009/10/21 21:11:57 rmind Exp $
.\"
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
@ -288,7 +288,6 @@ the include file
.Bl -column P_NOCLDSTOP P_NOCLDSTOP compact
.It Dv "P_ADVLOCK" Ta No "0x00000001 process may hold a POSIX advisory lock"
.It Dv "P_CONTROLT" Ta No "0x00000002 process has a controlling terminal"
.It Dv "P_INMEM" Ta No "0x00000004 process is loaded into memory"
.It Dv "P_NOCLDSTOP" Ta No "0x00000008 no
.Dv SIGCHLD
when children stop
@ -297,7 +296,7 @@ when children stop
.It Dv "P_SELECT" Ta No "0x00000040 selecting; wakeup/waiting danger"
.It Dv "P_SINTR" Ta No "0x00000080 sleep is interruptible"
.It Dv "P_SUGID" Ta No "0x00000100 process had set id privileges since last exec"
.It Dv "P_SYSTEM" Ta No "0x00000200 system process: no sigs, stats or swapping"
.It Dv "P_SYSTEM" Ta No "0x00000200 system process: no sigs or stats"
.It Dv "P_TIMEOUT" Ta No "0x00000400 timing out during sleep"
.It Dv "P_TRACED" Ta No "0x00000800 process is being traced"
.It Dv "P_WAITED" Ta No "0x00001000 debugging process has waited for child"
@ -382,9 +381,6 @@ The process is using scheduler activations.
The process is trying to exit.
.It K
The process is a kernel thread or system process.
.It L
The process has pages locked in core (for example, for raw
.Tn I/O ) .
.It l
The process has multiple LWPs.
.It N
@ -397,8 +393,6 @@ The process is a session leader.
.It V
The process is suspended during a
.Xr vfork 2 .
.It W
The process is swapped out.
.It X
The process is being traced or debugged.
.El
@ -522,8 +516,6 @@ group name (from gid)
group names (from group access list)
.It Ar groups
group access list
.It Ar holdcnt
number of holds on the process (if non-zero, process can't be swapped)
.It Ar inblk
total blocks read (alias
.Ar inblock )
@ -568,8 +560,6 @@ number of LWPs in the process
.It Ar nsigs
total signals taken (alias
.Ar nsignals )
.It Ar nswap
total swaps in/out
.It Ar nvcsw
total voluntary context switches
.It Ar nwchan

View File

@ -1,4 +1,4 @@
/* $NetBSD: m_netbsd.c,v 1.10 2009/07/27 16:26:48 njoly Exp $ */
/* $NetBSD: m_netbsd.c,v 1.11 2009/10/21 21:11:57 rmind Exp $ */
/*
* top - a top users display for Unix
@ -37,12 +37,12 @@
* Andrew Doran <ad@NetBSD.org>
*
*
* $Id: m_netbsd.c,v 1.10 2009/07/27 16:26:48 njoly Exp $
* $Id: m_netbsd.c,v 1.11 2009/10/21 21:11:57 rmind Exp $
*/
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: m_netbsd.c,v 1.10 2009/07/27 16:26:48 njoly Exp $");
__RCSID("$NetBSD: m_netbsd.c,v 1.11 2009/10/21 21:11:57 rmind Exp $");
#endif
#include <sys/param.h>
@ -786,9 +786,7 @@ format_next_proc(caddr_t handle, char *(*get_userid)(int))
hp->remaining--;
/* get the process's user struct and set cputime */
if ((pp->p_flag & L_INMEM) == 0)
pretty = "<>";
else if ((pp->p_flag & P_SYSTEM) != 0)
if ((pp->p_flag & P_SYSTEM) != 0)
pretty = "[]";
if (pretty[0] != '\0') {
@ -888,12 +886,6 @@ format_next_lwp(caddr_t handle, char *(*get_userid)(int))
/* get the process's user struct and set cputime */
if (pp) {
comm = pp->p_comm;
#if 0
/* XXX needs to be per thread but is not. just ignore for now. */
if ((pp->p_flag & L_INMEM) == 0)
pretty = "<>";
else
#endif
if ((pp->p_flag & P_SYSTEM) != 0)
pretty = "[]";

View File

@ -1,4 +1,4 @@
/* $NetBSD: kvm_proc.c,v 1.83 2009/05/16 11:56:47 yamt Exp $ */
/* $NetBSD: kvm_proc.c,v 1.84 2009/10/21 21:11:58 rmind Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -67,7 +67,7 @@
#if 0
static char sccsid[] = "@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93";
#else
__RCSID("$NetBSD: kvm_proc.c,v 1.83 2009/05/16 11:56:47 yamt Exp $");
__RCSID("$NetBSD: kvm_proc.c,v 1.84 2009/10/21 21:11:58 rmind Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -834,7 +834,7 @@ again:
kl->l_swtime = l.l_swtime;
kl->l_slptime = l.l_slptime;
kl->l_schedflags = 0; /* XXX */
kl->l_holdcnt = l.l_holdcnt;
kl->l_holdcnt = 0;
kl->l_priority = l.l_priority;
kl->l_usrpri = l.l_priority;
kl->l_stat = l.l_stat;

View File

@ -1,4 +1,4 @@
.\" $NetBSD: uvm.9,v 1.98 2009/08/03 19:08:48 rmind Exp $
.\" $NetBSD: uvm.9,v 1.99 2009/10/21 21:11:58 rmind Exp $
.\"
.\" Copyright (c) 1998 Matthew R. Green
.\" All rights reserved.
@ -677,8 +677,6 @@ value.
.Fn uvm_pageout "void" ;
.It Ft void
.Fn uvm_scheduler "void" ;
.It Ft void
.Fn uvm_swapin "struct lwp *l" ;
.El
.Pp
.Fn uvm_pageout
@ -689,9 +687,6 @@ is the process zero main loop, which is to be called after the
system has finished starting other processes.
It handles the swapping in of runnable, swapped out processes in priority
order.
.Pp
.Fn uvm_swapin
swaps in the named lwp.
.Sh PAGE LOAN
.Bl -ohang
.It Ft int
@ -770,7 +765,7 @@ and should match what was used for previous call to
.It Ft void
.Fn uvm_meter "void" ;
.It Ft void
.Fn uvm_fork "struct lwp *l1" "struct lwp *l2" "bool shared" ;
.Fn uvm_proc_fork "struct proc *p1" "struct proc *p2" "bool shared" ;
.It Ft int
.Fn uvm_grow "struct proc *p" "vaddr_t sp" ;
.It Ft void
@ -836,9 +831,9 @@ to
These functions are normally used to wire memory for I/O.
.Pp
.Fn uvm_meter
calculates the load average and wakes up the swapper if necessary.
calculates the load average.
.Pp
.Fn uvm_fork
.Fn uvm_proc_fork
forks a virtual address space for process' (old)
.Fa p1
and (new)
@ -980,8 +975,6 @@ int softs; /* software interrupt count */
int syscalls; /* system calls */
int pageins; /* pagein operation count */
/* pageouts are in pdpageouts below */
int swapins; /* swapins */
int swapouts; /* swapouts */
int pgswapin; /* pages swapped in */
int pgswapout; /* pages swapped out */
int forks; /* forks */
@ -1011,7 +1004,6 @@ int flt_przero; /* number of times fault promotes with zerofill (2b) */
/* daemon counters */
int pdwoke; /* number of times daemon woke up */
int pdrevs; /* number of times daemon rev'd clock hand */
int pdswout; /* number of times daemon called for swapout */
int pdfreed; /* number of pages daemon freed since boot */
int pdscans; /* number of pages daemon scanned since boot */
int pdanscan; /* number of anonymous pages scanned by daemon */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.28 2009/05/10 21:47:57 he Exp $ */
/* $NetBSD: pmap.c,v 1.29 2009/10/21 21:11:58 rmind Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000 Ben Harris
* All rights reserved.
@ -102,7 +102,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.28 2009/05/10 21:47:57 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.29 2009/10/21 21:11:58 rmind Exp $");
#include <sys/kernel.h> /* for cold */
#include <sys/malloc.h>
@ -482,15 +482,6 @@ pmap_unwire(pmap_t pmap, vaddr_t va)
pv->pv_vflags &= ~PV_WIRED;
}
void
pmap_collect(pmap_t pmap)
{
UVMHIST_FUNC("pmap_collect");
UVMHIST_CALLED(pmaphist);
/* This is allowed to be a no-op. */
}
void
pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vaddr_t dst_addr, vsize_t len, vaddr_t src_addr)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.21 2009/03/18 16:00:08 cegger Exp $ */
/* $NetBSD: vm_machdep.c,v 1.22 2009/10/21 21:11:58 rmind Exp $ */
/*-
* Copyright (c) 2000, 2001 Ben Harris
@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.21 2009/03/18 16:00:08 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.22 2009/10/21 21:11:58 rmind Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@ -171,20 +171,6 @@ cpu_lwp_free2(struct lwp *l)
/* Nothing to do here? */
}
void
cpu_swapin(struct lwp *l)
{
/* Can anyone think of anything I should do here? */
}
void
cpu_swapout(struct lwp *l)
{
/* ... or here, for that matter. */
}
/*
* Map a user I/O request into kernel virtual address space.
* Note: the pages are already locked by uvm_vslock(), so we

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.24 2008/07/02 19:49:58 rmind Exp $ */
/* $NetBSD: db_trace.c,v 1.25 2009/10/21 21:11:58 rmind Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.24 2008/07/02 19:49:58 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.25 2009/10/21 21:11:58 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -230,10 +230,6 @@ db_stack_trace_print(db_expr_t addr, bool have_addr, db_expr_t count,
KASSERT(l != NULL);
}
(*pr)("lid %d ", l->l_lid);
if ((l->l_flag & LW_INMEM) == 0) {
(*pr)("swapped out\n");
return;
}
pcbp = &l->l_addr->u_pcb;
addr = (db_expr_t)pcbp->pcb_hw.apcb_ksp;
callpc = pcbp->pcb_context[7];

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.243 2009/10/04 17:00:31 mhitch Exp $ */
/* $NetBSD: pmap.c,v 1.244 2009/10/21 21:11:58 rmind Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008 The NetBSD Foundation, Inc.
@ -140,7 +140,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.243 2009/10/04 17:00:31 mhitch Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.244 2009/10/21 21:11:58 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1268,8 +1268,7 @@ pmap_remove(pmap_t pmap, vaddr_t sva, vaddr_t eva)
* pmap_do_remove:
*
* This actually removes the range of addresses from the
* specified map. It is used by pmap_collect() (does not
* want to remove wired mappings) and pmap_remove() (does
* specified map. It is used by and pmap_remove() (does
* want to remove wired mappings).
*/
static void
@ -2146,42 +2145,6 @@ pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *pap)
*/
/* call deleted in <machine/pmap.h> */
/*
* pmap_collect: [ INTERFACE ]
*
* Garbage collects the physical map system for pages which are no
* longer used. Success need not be guaranteed -- that is, there
* may well be pages which are not referenced, but others may be
* collected.
*
* Called by the pageout daemon when pages are scarce.
*/
void
pmap_collect(pmap_t pmap)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_collect(%p)\n", pmap);
#endif
/*
* If called for the kernel pmap, just return. We
* handle this case in the event that we ever want
* to have swappable kernel threads.
*/
if (pmap == pmap_kernel())
return;
/*
* This process is about to be swapped out; free all of
* the PT pages by removing the physical mappings for its
* entire address space. Note: pmap_remove() performs
* all necessary locking.
*/
pmap_do_remove(pmap, VM_MIN_ADDRESS, VM_MAX_ADDRESS, false);
}
/*
* pmap_activate: [ INTERFACE ]
*

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.100 2009/06/01 20:58:16 martin Exp $ */
/* $NetBSD: vm_machdep.c,v 1.101 2009/10/21 21:11:58 rmind Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@ -29,7 +29,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.100 2009/06/01 20:58:16 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.101 2009/10/21 21:11:58 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -185,35 +185,6 @@ cpu_setfunc(struct lwp *l, void (*func)(void *), void *arg)
(u_int64_t)setfunc_trampoline; /* ra: assembly magic */
}
/*
* Finish a swapin operation.
*
* We need to cache the physical address of the PCB, so we can
* swap context to it easily.
*/
void
cpu_swapin(struct lwp *l)
{
struct user *up = l->l_addr;
l->l_md.md_pcbpaddr = (void *)vtophys((vaddr_t)&up->u_pcb);
}
/*
* cpu_swapout is called immediately before a process's 'struct user'
* and kernel stack are unwired (which are in turn done immediately
* before it's P_INMEM flag is cleared). If the process is the
* current owner of the floating point unit, the FP state has to be
* saved, so that it goes out with the pcb, which is in the user area.
*/
void
cpu_swapout(struct lwp *l)
{
if (l->l_addr->u_pcb.pcb_fpcpu != NULL)
fpusave_proc(l, 1);
}
/*
* Map a user I/O request into kernel virtual address space.
* Note: the pages are already locked by uvm_vslock(), so we

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.15 2009/03/15 14:21:48 cegger Exp $ */
/* $NetBSD: db_trace.c,v 1.16 2009/10/21 21:11:58 rmind Exp $ */
/*
* Mach Operating System
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.15 2009/03/15 14:21:48 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.16 2009/10/21 21:11:58 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -355,10 +355,6 @@ db_stack_trace_print(db_expr_t addr, bool have_addr, db_expr_t count,
KASSERT(l != NULL);
}
(*pr)("lid %d ", l->l_lid);
if (!(l->l_flag & LW_INMEM)) {
(*pr)("swapped out\n");
return;
}
u = l->l_addr;
if (p == curproc && l == curlwp) {
frame = (long *)ddb_regs.tf_rbp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.154 2009/08/26 00:30:01 thorpej Exp $ */
/* $NetBSD: pmap.c,v 1.155 2009/10/21 21:11:58 rmind Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -100,7 +100,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.154 2009/08/26 00:30:01 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.155 2009/10/21 21:11:58 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -325,7 +325,7 @@ void pmap_pinit(pmap_t);
void pmap_release(pmap_t);
static void pmap_remove_mapping(pmap_t, vaddr_t, pt_entry_t *, int);
void pmap_collect1(pmap_t, paddr_t, paddr_t);
static void pmap_collect1(pmap_t, paddr_t, paddr_t);
/* pmap_remove_mapping flags */
#define PRM_TFLUSH 0x01
@ -1430,10 +1430,8 @@ void pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
* Success need not be guaranteed -- that is, there
* may well be pages which are not referenced, but
* others may be collected.
* Usage:
* Called by the pageout daemon when pages are scarce.
*/
void
static void
pmap_collect(pmap_t pmap)
{
int bank, s;
@ -1466,7 +1464,7 @@ pmap_collect(pmap_t pmap)
* Helper function for pmap_collect(). Do the actual
* garbage-collection of range of physical addresses.
*/
void
static void
pmap_collect1(pmap_t pmap, paddr_t startpa, paddr_t endpa)
{
paddr_t pa;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.72 2009/05/19 18:39:27 phx Exp $ */
/* $NetBSD: cpu.h,v 1.73 2009/10/21 21:11:58 rmind Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@ -111,8 +111,6 @@ extern struct cpu_info cpu_info_store;
* definitions of cpu-dependent requirements
* referenced in generic code
*/
#define cpu_swapin(p) /* nothing */
#define cpu_swapout(p) /* nothing */
#define cpu_number() 0
void cpu_proc_fork(struct proc *, struct proc *);

View File

@ -1,4 +1,4 @@
$NetBSD: TODO,v 1.27 2008/02/02 15:47:48 tsutsui Exp $
$NetBSD: TODO,v 1.28 2009/10/21 21:11:59 rmind Exp $
To do list (in some particular order)
XXX some entries might be obsolete.
@ -110,8 +110,6 @@ XXX some entries might be obsolete.
o 64bit kernel/userland
o omit __SWAP_BROKEN in <mips/types.h>
o clean up ALEAF/NLEAF/NON_LEAF/NNON_LEAF in userland.
Lots of other things.....

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.19 2009/03/15 22:23:16 cegger Exp $ */
/* $NetBSD: db_trace.c,v 1.20 2009/10/21 21:11:59 rmind Exp $ */
/*
* Copyright (c) 2000, 2001 Ben Harris
@ -31,7 +31,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.19 2009/03/15 22:23:16 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.20 2009/10/21 21:11:59 rmind Exp $");
#include <sys/proc.h>
#include <sys/user.h>
@ -125,10 +125,6 @@ db_stack_trace_print(db_expr_t addr, bool have_addr,
KASSERT(l != NULL);
}
(*pr)("lid %d ", l->l_lid);
if (!(l->l_flag & LW_INMEM)) {
(*pr)("swapped out\n");
return;
}
u = l->l_addr;
#ifdef acorn26
frame = (u_int32_t *)(u->u_pcb.pcb_sf->sf_r11);

View File

@ -1,4 +1,4 @@
/* $NetBSD: syscall.c,v 1.48 2009/01/15 23:33:41 bjh21 Exp $ */
/* $NetBSD: syscall.c,v 1.49 2009/10/21 21:11:59 rmind Exp $ */
/*-
* Copyright (c) 2000, 2003 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.48 2009/01/15 23:33:41 bjh21 Exp $");
__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.49 2009/10/21 21:11:59 rmind Exp $");
#include "opt_sa.h"
@ -269,7 +269,6 @@ syscall(struct trapframe *frame, lwp_t *l, uint32_t insn)
|| (error = trace_enter(code, args, nargs)) == 0) {
rval[0] = 0;
rval[1] = 0;
KASSERT(l->l_holdcnt == 0);
error = (*callp->sy_call)(l, args, rval);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.198 2009/04/21 21:29:58 cegger Exp $ */
/* $NetBSD: pmap.c,v 1.199 2009/10/21 21:11:59 rmind Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@ -212,7 +212,7 @@
#include <machine/param.h>
#include <arm/arm32/katelib.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.198 2009/04/21 21:29:58 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.199 2009/10/21 21:11:59 rmind Exp $");
#ifdef PMAP_DEBUG
@ -4037,25 +4037,6 @@ out:
return (rv);
}
/*
* pmap_collect: free resources held by a pmap
*
* => optional function.
* => called when a process is swapped out to free memory.
*/
void
pmap_collect(pmap_t pm)
{
#ifdef PMAP_CACHE_VIVT
pmap_idcache_wbinv_all(pm);
#endif
pm->pm_remove_all = true;
pmap_do_remove(pm, VM_MIN_ADDRESS, VM_MAX_ADDRESS, 1);
pmap_update(pm);
PMAPCOUNT(collects);
}
/*
* Routine: pmap_procwr
*

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.49 2009/03/14 21:04:05 dsl Exp $ */
/* $NetBSD: vm_machdep.c,v 1.50 2009/10/21 21:11:59 rmind Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.49 2009/03/14 21:04:05 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.50 2009/10/21 21:11:59 rmind Exp $");
#include "opt_armfpe.h"
#include "opt_pmap_debug.h"
@ -244,59 +244,6 @@ cpu_lwp_free2(struct lwp *l)
{
}
void
cpu_swapin(struct lwp *l)
{
#if 0
struct proc *p = l->l_proc;
/* Don't do this. See the comment in cpu_swapout(). */
#ifdef PMAP_DEBUG
if (pmap_debug_level >= 0)
printf("cpu_swapin(%p, %d, %s, %p)\n", l, l->l_lid,
p->p_comm, p->p_vmspace->vm_map.pmap);
#endif /* PMAP_DEBUG */
if (vector_page < KERNEL_BASE) {
/* Map the vector page */
pmap_enter(p->p_vmspace->vm_map.pmap, vector_page,
systempage.pv_pa, VM_PROT_READ, VM_PROT_READ|PMAP_WIRED);
pmap_update(p->p_vmspace->vm_map.pmap);
}
#endif
}
void
cpu_swapout(struct lwp *l)
{
#ifdef FPU_VFP
if (l->l_addr->u_pcb.pcb_vfpcpu != NULL)
vfp_saveregs_lwp(l, 1);
#endif
#if 0
struct proc *p = l->l_proc;
/*
* Don't do this! If the pmap is shared with another process,
* it will loose it's page0 entry. That's bad news indeed.
*/
#ifdef PMAP_DEBUG
if (pmap_debug_level >= 0)
printf("cpu_swapout(%p, %d, %s, %p)\n", l, l->l_lid,
p->p_comm, &p->p_vmspace->vm_map.pmap);
#endif /* PMAP_DEBUG */
if (vector_page < KERNEL_BASE) {
/* Free the system page mapping */
pmap_remove(p->p_vmspace->vm_map.pmap, vector_page,
vector_page + PAGE_SIZE);
pmap_update(p->p_vmspace->vm_map.pmap);
}
#endif
}
/*
* Map a user I/O request into kernel virtual address space.
* Note: the pages are already locked by uvm_vslock(), so we

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.120 2009/08/26 00:30:02 thorpej Exp $ */
/* $NetBSD: pmap.c,v 1.121 2009/10/21 21:11:59 rmind Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -100,7 +100,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.120 2009/08/26 00:30:02 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.121 2009/10/21 21:11:59 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -320,7 +320,7 @@ void pmap_pinit(pmap_t);
void pmap_release(pmap_t);
static void pmap_remove_mapping(pmap_t, vaddr_t, pt_entry_t *, int);
void pmap_collect1(pmap_t, paddr_t, paddr_t);
static void pmap_collect1(pmap_t, paddr_t, paddr_t);
/* pmap_remove_mapping flags */
#define PRM_TFLUSH 0x01
@ -1425,10 +1425,8 @@ void pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
* Success need not be guaranteed -- that is, there
* may well be pages which are not referenced, but
* others may be collected.
* Usage:
* Called by the pageout daemon when pages are scarce.
*/
void
static void
pmap_collect(pmap_t pmap)
{
int bank, s;
@ -1461,7 +1459,7 @@ pmap_collect(pmap_t pmap)
* Helper function for pmap_collect(). Do the actual
* garbage-collection of range of physical addresses.
*/
void
static void
pmap_collect1(pmap_t pmap, paddr_t startpa, paddr_t endpa)
{
paddr_t pa;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.62 2009/03/05 13:00:45 tsutsui Exp $ */
/* $NetBSD: cpu.h,v 1.63 2009/10/21 21:11:59 rmind Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@ -112,8 +112,6 @@ extern struct cpu_info cpu_info_store;
* definitions of cpu-dependent requirements
* referenced in generic code
*/
#define cpu_swapin(p) /* nothing */
#define cpu_swapout(p) /* nothing */
#define cpu_number() 0
void cpu_proc_fork(struct proc *, struct proc *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.22 2009/03/14 14:45:58 dsl Exp $ */
/* $NetBSD: cpu.h,v 1.23 2009/10/21 21:11:59 rmind Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@ -107,8 +107,6 @@ extern struct cpu_info cpu_info_store;
* definitions of cpu-dependent requirements
* referenced in generic code
*/
#define cpu_swapin(p) /* nothing */
#define cpu_swapout(p) /* nothing */
#define cpu_number() 0
void cpu_proc_fork(struct proc *, struct proc *);

View File

@ -1,11 +1,10 @@
# $NetBSD: std.gdium,v 1.3 2009/08/09 22:26:45 matt Exp $
# $NetBSD: std.gdium,v 1.4 2009/10/21 21:11:59 rmind Exp $
machine evbmips mips
include "conf/std" # MI standard options
options MIPS3_ENABLE_CLOCK_INTR
options ENABLE_MIPS_16KB_PAGE
no options VMSWAP_UAREA
#options UVMHIST,UVMHIST_PRINT

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.60 2009/07/29 17:45:39 rmind Exp $ */
/* $NetBSD: cpu.h,v 1.61 2009/10/21 21:11:59 rmind Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@ -117,8 +117,6 @@ extern struct cpu_info cpu_info_store;
* definitions of cpu-dependent requirements
* referenced in generic code
*/
#define cpu_swapin(p) /* nothing */
#define cpu_swapout(p) /* nothing */
#define cpu_number() 0
void cpu_proc_fork(struct proc *, struct proc *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.3 2008/11/27 14:28:23 skrll Exp $ */
/* $NetBSD: db_trace.c,v 1.4 2009/10/21 21:12:00 rmind Exp $ */
/* $OpenBSD: db_interface.c,v 1.16 2001/03/22 23:31:45 mickey Exp $ */
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.3 2008/11/27 14:28:23 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.4 2009/10/21 21:12:00 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -98,10 +98,6 @@ db_stack_trace_print(db_expr_t addr, bool have_addr, db_expr_t count,
KASSERT(l != NULL);
}
(*pr)("lid %d ", l->l_lid);
if (!(l->l_flag & LW_INMEM)) {
(*pr)("swapped out\n");
return;
}
u = l->l_addr;
if (p == curproc && l == curlwp) {
fp = (int *)ddb_regs.tf_r3;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.52 2009/08/12 10:03:30 skrll Exp $ */
/* $NetBSD: pmap.c,v 1.53 2009/10/21 21:12:00 rmind Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.52 2009/08/12 10:03:30 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.53 2009/10/21 21:12:00 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1230,15 +1230,6 @@ pmap_reference(pmap_t pmap)
mutex_exit(&pmap->pm_lock);
}
void
pmap_collect(pmap_t pmap)
{
DPRINTF(PDB_FOLLOW|PDB_PMAP, ("%s(%p)\n", __func__, pmap));
/* nothing yet */
}
/*
* pmap_enter(pmap, va, pa, prot, flags)
* Create a translation for the virtual address (va) to the physical

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.36 2009/06/03 21:08:51 skrll Exp $ */
/* $NetBSD: vm_machdep.c,v 1.37 2009/10/21 21:12:00 rmind Exp $ */
/* $OpenBSD: vm_machdep.c,v 1.64 2008/09/30 18:54:26 miod Exp $ */
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.36 2009/06/03 21:08:51 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.37 2009/10/21 21:12:00 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -51,8 +51,8 @@ __KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.36 2009/06/03 21:08:51 skrll Exp $"
#include <hppa/hppa/machdep.h>
void
cpu_swapin(struct lwp *l)
static inline void
cpu_activate_pcb(struct lwp *l)
{
struct trapframe *tf = l->l_md.md_regs;
vaddr_t pcb = (vaddr_t)l->l_addr;
@ -75,14 +75,6 @@ cpu_swapin(struct lwp *l)
#endif
}
void
cpu_swapout(struct lwp *l)
{
/* Flush this LWP out of the FPU. */
hppa_fpu_flush(l);
}
void
cpu_lwp_fork(struct lwp *l1, struct lwp *l2, void *stack, size_t stacksize,
void (*func)(void *), void *arg)
@ -122,11 +114,8 @@ cpu_lwp_fork(struct lwp *l1, struct lwp *l2, void *stack, size_t stacksize,
/* copy the l1's trapframe to l2 */
memcpy(tf, l1->l_md.md_regs, sizeof(*tf));
/*
* cpu_swapin() is supposed to fill out all the PAs
* we gonna need in locore
*/
cpu_swapin(l2);
/* Fill out all the PAs we are going to need in locore. */
cpu_activate_pcb(l2);
/* Load all of the user's space registers. */
tf->tf_sr0 = tf->tf_sr1 = tf->tf_sr3 = tf->tf_sr2 =
@ -193,7 +182,7 @@ cpu_setfunc(struct lwp *l, void (*func)(void *), void *arg)
l->l_md.md_regs = tf = (struct trapframe *)sp;
sp += sizeof(struct trapframe);
cpu_swapin(l);
cpu_activate_pcb(l);
/*
* Build stack frames for the cpu_switchto & co.

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.62 2009/08/26 23:17:03 bouyer Exp $ */
/* $NetBSD: db_trace.c,v 1.63 2009/10/21 21:12:00 rmind Exp $ */
/*
* Mach Operating System
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.62 2009/08/26 23:17:03 bouyer Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.63 2009/10/21 21:12:00 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -453,10 +453,6 @@ db_stack_trace_print(db_expr_t addr, bool have_addr, db_expr_t count,
sizeof(l), (char *)&l);
}
(*pr)("lid %d ", l.l_lid);
if (!(l.l_flag & LW_INMEM)) {
(*pr)("swapped out\n");
return;
}
u = l.l_addr;
#ifdef _KERNEL
if (l.l_proc == curproc &&

View File

@ -1,4 +1,4 @@
/* $NetBSD: process_machdep.c,v 1.70 2009/03/14 21:04:10 dsl Exp $ */
/* $NetBSD: process_machdep.c,v 1.71 2009/10/21 21:12:00 rmind Exp $ */
/*-
* Copyright (c) 1998, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.70 2009/03/14 21:04:10 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.71 2009/10/21 21:12:00 rmind Exp $");
#include "opt_vm86.h"
#include "opt_ptrace.h"
@ -522,8 +522,6 @@ process_machdep_doxmmregs(struct lwp *curl, struct lwp *l, struct uio *uio)
if (kl > uio->uio_resid)
kl = uio->uio_resid;
uvm_lwp_hold(l);
if (kl < 0)
error = EINVAL;
else
@ -537,8 +535,6 @@ process_machdep_doxmmregs(struct lwp *curl, struct lwp *l, struct uio *uio)
error = process_machdep_write_xmmregs(l, &r);
}
uvm_lwp_rele(l);
uio->uio_offset = 0;
return (error);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.21 2009/07/20 04:41:37 kiyohara Exp $ */
/* $NetBSD: pmap.c,v 1.22 2009/10/21 21:12:00 rmind Exp $ */
/*-
@ -85,7 +85,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.21 2009/07/20 04:41:37 kiyohara Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.22 2009/10/21 21:12:00 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -950,44 +950,6 @@ pmap_copy_page(paddr_t psrc, paddr_t pdst)
memcpy( (void *) vdst, (void *) vsrc, PAGE_SIZE);
}
/*
* pmap_collect: [ INTERFACE ]
*
* Garbage collects the physical map system for pages which are no
* longer used. Success need not be guaranteed -- that is, there
* may well be pages which are not referenced, but others may be
* collected.
*
* Called by the pageout daemon when pages are scarce.
*/
void
pmap_collect(pmap_t pmap)
{
#ifdef DEBUG
printf("pmap_collect(%p)\n", pmap);
#endif
/*
* If called for the kernel pmap, just return. We
* handle this case in the event that we ever want
* to have swappable kernel threads.
*/
if (pmap == pmap_kernel())
return;
/*
* This process is about to be swapped out; free all of
* the PT pages by removing the physical mappings for its
* entire address space. Note: pmap_remove() performs
* all necessary locking.
* XXX: Removes wired pages as well via pmap_remove(). Fixme.!!!!!
*/
pmap_remove(pmap, VM_MIN_ADDRESS, VM_MAX_ADDRESS);
}
/*
* pmap_unwire: [ INTERFACE ]
*

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.6 2009/07/20 04:41:37 kiyohara Exp $ */
/* $NetBSD: vm_machdep.c,v 1.7 2009/10/21 21:12:00 rmind Exp $ */
/*
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@ -127,33 +127,6 @@ cpu_lwp_fork(struct lwp *l1, struct lwp *l2, void *stack, size_t stacksize,
return;
}
/*
* Finish a swapin operation.
*
* We need to cache the physical address of the PCB, so we can
* swap context to it easily.
*/
void
cpu_swapin(struct lwp *l)
{
printf("%s: not yet\n", __func__);
return;
}
/*
* cpu_swapout is called immediately before a process's 'struct user'
* and kernel stack are unwired (which are in turn done immediately
* before it's P_INMEM flag is cleared). If the process is the
* current owner of the floating point unit, the FP state has to be
* saved, so that it goes out with the pcb, which is in the user area.
*/
void
cpu_swapout(struct lwp *l)
{
printf("%s: not yet\n", __func__);
return;
}
/*
* Map a user I/O request into kernel virtual address space.
* Note: the pages are already locked by uvm_vslock(), so we

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.26 2009/03/14 14:46:01 dsl Exp $ */
/* $NetBSD: cpu.h,v 1.27 2009/10/21 21:12:00 rmind Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@ -108,8 +108,6 @@ extern struct cpu_info cpu_info_store;
* definitions of cpu-dependent requirements
* referenced in generic code
*/
#define cpu_swapin(p) /* nothing */
#define cpu_swapout(p) /* nothing */
#define cpu_number() 0
void cpu_proc_fork(struct proc *, struct proc *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.53 2008/07/02 19:49:58 rmind Exp $ */
/* $NetBSD: db_trace.c,v 1.54 2009/10/21 21:12:00 rmind Exp $ */
/*
* Mach Operating System
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.53 2008/07/02 19:49:58 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.54 2009/10/21 21:12:00 rmind Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@ -447,10 +447,6 @@ db_stack_trace_print(db_expr_t addr, bool have_addr, db_expr_t count,
KASSERT(l != NULL);
}
(*pr)("lid %d ", l->l_lid);
if (!(l->l_flag & LW_INMEM)) {
(*pr)("swapped out\n");
return;
}
u = l->l_addr;
pos.k_fp = u->u_pcb.pcb_regs[PCB_REGS_FP];
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap_motorola.c,v 1.47 2009/10/11 20:37:47 mhitch Exp $ */
/* $NetBSD: pmap_motorola.c,v 1.48 2009/10/21 21:12:00 rmind Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -117,7 +117,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap_motorola.c,v 1.47 2009/10/11 20:37:47 mhitch Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap_motorola.c,v 1.48 2009/10/21 21:12:00 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -280,7 +280,7 @@ struct pool pmap_pmap_pool; /* memory pool for pmap structures */
struct pv_entry *pmap_alloc_pv(void);
void pmap_free_pv(struct pv_entry *);
void pmap_collect_pv(void);
static void pmap_collect_pv(void);
#define PAGE_IS_MANAGED(pa) (pmap_initialized && uvm_pageismanaged(pa))
@ -593,7 +593,7 @@ pmap_free_pv(struct pv_entry *pv)
*
* Perform compaction on the PV list, called via pmap_collect().
*/
void
static void
pmap_collect_pv(void)
{
struct pv_page_list pv_page_collectlist;
@ -1671,10 +1671,8 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vaddr_t dst_addr, vsize_t len,
* longer used. Success need not be guaranteed -- that is, there
* may well be pages which are not referenced, but others may be
* collected.
*
* Called by the pageout daemon when pages are scarce.
*/
void
static void
pmap_collect(pmap_t pmap)
{
@ -1719,7 +1717,7 @@ pmap_collect(pmap_t pmap)
* Note: THIS SHOULD GO AWAY, AND BE REPLACED WITH A BETTER
* WAY OF HANDLING PT PAGES!
*/
void
static void
pmap_collect1(pmap_t pmap, paddr_t startpa, paddr_t endpa)
{
paddr_t pa;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.92 2008/02/27 18:26:16 xtraeme Exp $ */
/* $NetBSD: cpu.h,v 1.93 2009/10/21 21:12:00 rmind Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@ -132,8 +132,6 @@ extern struct cpu_info cpu_info_store;
* definitions of cpu-dependent requirements
* referenced in generic code
*/
#define cpu_swapin(p) /* nothing */
#define cpu_swapout(p) /* nothing */
#define cpu_number() 0
void cpu_proc_fork(struct proc *, struct proc *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.90 2008/05/26 15:59:29 tsutsui Exp $ */
/* $NetBSD: cpu.h,v 1.91 2009/10/21 21:12:00 rmind Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -264,7 +264,6 @@ extern u_int mips3_pg_shift;
* definitions of cpu-dependent requirements
* referenced in generic code
*/
#define cpu_swapout(p) panic("cpu_swapout: can't get here");
void cpu_intr(u_int32_t, u_int32_t, u_int32_t, u_int32_t);

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.43 2007/11/29 00:58:03 ad Exp $ */
/* $NetBSD: types.h,v 1.44 2009/10/21 21:12:01 rmind Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -92,8 +92,6 @@ typedef volatile int __cpu_simple_lock_t;
#define __SIMPLELOCK_LOCKED 1
#define __SIMPLELOCK_UNLOCKED 0
#define __SWAP_BROKEN
#define __HAVE_AST_PERPROC
#define __HAVE_SYSCALL_INTERN
#ifdef MIPS3_PLUS /* XXX bogus! */

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.35 2007/10/17 19:55:37 garbled Exp $ */
/* $NetBSD: db_trace.c,v 1.36 2009/10/21 21:12:01 rmind Exp $ */
/*
* Mach Operating System
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.35 2007/10/17 19:55:37 garbled Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.36 2009/10/21 21:12:01 rmind Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -164,11 +164,6 @@ db_stack_trace_print(db_expr_t addr, bool have_addr, db_expr_t count,
return;
}
l = LIST_FIRST(&p->p_lwps); /* XXX NJWLWP */
if (!(l->l_flag & LW_INMEM)) {
(*pr)("swapped out\n");
return;
}
pcb = &(l->l_addr->u_pcb);
(*pr)("at %p\n", pcb);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mipsX_subr.S,v 1.31 2009/08/09 22:24:53 matt Exp $ */
/* $NetBSD: mipsX_subr.S,v 1.32 2009/10/21 21:12:01 rmind Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@ -2046,7 +2046,7 @@ END(MIPSX(setfunc_trampoline))
* sure TBIS(it) in the case.
*/
LEAF_NOPROFILE(MIPSX(cpu_switch_resume))
#if !defined(ENABLE_MIPS_16KB_PAGE) || defined(VMSWAP_UAREA)
#if !defined(ENABLE_MIPS_16KB_PAGE)
lw a1, L_MD_UPTE_0(a0) # a1 = upte[0]
lw a2, L_MD_UPTE_1(a0) # a2 = upte[1]
lw v0, L_ADDR(a0) # va = l->l_addr
@ -2105,7 +2105,7 @@ entry0set:
nop
resume:
#endif /* !ENABLE_MIPS_16KB_PAGE || VMSWAP_UAREA */
#endif /* !ENABLE_MIPS_16KB_PAGE
j ra
nop
END(MIPSX(cpu_switch_resume))

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.184 2009/08/18 18:06:53 thorpej Exp $ */
/* $NetBSD: pmap.c,v 1.185 2009/10/21 21:12:01 rmind Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@ -67,7 +67,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.184 2009/08/18 18:06:53 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.185 2009/10/21 21:12:01 rmind Exp $");
/*
* Manages physical address maps.
@ -1562,27 +1562,6 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vaddr_t dst_addr, vsize_t len,
#endif
}
/*
* Routine: pmap_collect
* Function:
* Garbage collects the physical map system for
* pages which are no longer used.
* Success need not be guaranteed -- that is, there
* may well be pages which are not referenced, but
* others may be collected.
* Usage:
* Called by the pageout daemon when pages are scarce.
*/
void
pmap_collect(pmap_t pmap)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_collect(%p)\n", pmap);
#endif
}
/*
* pmap_zero_page zeros the specified page.
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.125 2009/08/20 01:33:04 cliff Exp $ */
/* $NetBSD: vm_machdep.c,v 1.126 2009/10/21 21:12:01 rmind Exp $ */
/*
* Copyright (c) 1992, 1993
@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.125 2009/08/20 01:33:04 cliff Exp $");
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.126 2009/10/21 21:12:01 rmind Exp $");
#include "opt_ddb.h"
@ -207,32 +207,6 @@ cpu_setfunc(struct lwp *l, void (*func)(void *), void *arg)
#endif
}
/*
* Finish a swapin operation.
* We neded to update the cached PTEs for the user area in the
* machine dependent part of the proc structure.
*/
void
cpu_swapin(struct lwp *l)
{
#if USPACE > PAGE_SIZE
pt_entry_t *pte;
int i, x;
/*
* Cache the PTEs for the user area in the machine dependent
* part of the proc struct so cpu_switchto() can quickly map
* in the user struct and kernel stack.
*/
x = (MIPS_HAS_R4K_MMU) ?
(MIPS3_PG_G | MIPS3_PG_RO | MIPS3_PG_WIRED) :
MIPS1_PG_G;
pte = kvtopte(l->l_addr);
for (i = 0; i < UPAGES; i++)
l->l_md.md_upte[i] = pte[i].pt_entry &~ x;
#endif
}
void
cpu_lwp_free(struct lwp *l, int proc)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.42 2008/02/27 18:26:16 xtraeme Exp $ */
/* $NetBSD: cpu.h,v 1.43 2009/10/21 21:12:01 rmind Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@ -112,8 +112,6 @@ extern struct cpu_info cpu_info_store;
* definitions of cpu-dependent requirements
* referenced in generic code
*/
#define cpu_swapin(p) /* nothing */
#define cpu_swapout(p) /* nothing */
#define cpu_number() 0
void cpu_proc_fork(struct proc *, struct proc *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.34 2009/07/29 17:45:39 rmind Exp $ */
/* $NetBSD: cpu.h,v 1.35 2009/10/21 21:12:01 rmind Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@ -132,8 +132,6 @@ extern struct cpu_info cpu_info_store;
* definitions of cpu-dependent requirements
* referenced in generic code
*/
#define cpu_swapin(p) /* nothing */
#define cpu_swapout(p) /* nothing */
#define cpu_number() 0
void cpu_proc_fork(struct proc *, struct proc *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.40 2007/10/17 19:56:04 garbled Exp $ */
/* $NetBSD: cpu.h,v 1.41 2009/10/21 21:12:01 rmind Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@ -119,8 +119,6 @@ extern struct cpu_info cpu_info_store;
* definitions of cpu-dependent requirements
* referenced in generic code
*/
#define cpu_swapin(p) /* nothing */
#define cpu_swapout(p) /* nothing */
#define cpu_number() 0
void cpu_proc_fork(struct proc *, struct proc *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.57 2009/08/18 18:06:53 thorpej Exp $ */
/* $NetBSD: pmap.c,v 1.58 2009/10/21 21:12:01 rmind Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.57 2009/08/18 18:06:53 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.58 2009/10/21 21:12:01 rmind Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@ -673,19 +673,6 @@ pmap_update(struct pmap *pmap)
{
}
/*
* Garbage collects the physical map system for
* pages which are no longer used.
* Success need not be guaranteed -- that is, there
* may well be pages which are not referenced, but
* others may be collected.
* Called by the pageout daemon when pages are scarce.
*/
void
pmap_collect(struct pmap *pm)
{
}
/*
* Fill the given physical page with zeroes.
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.51 2009/03/14 15:36:12 dsl Exp $ */
/* $NetBSD: trap.c,v 1.52 2009/10/21 21:12:01 rmind Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.51 2009/03/14 15:36:12 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.52 2009/10/21 21:12:01 rmind Exp $");
#include "opt_altivec.h"
#include "opt_ddb.h"
@ -495,10 +495,8 @@ bigcopyin(const void *udaddr, void *kaddr, size_t len)
/*
* Stolen from physio():
*/
uvm_lwp_hold(l);
error = uvm_vslock(p->p_vmspace, __UNCONST(udaddr), len, VM_PROT_READ);
if (error) {
uvm_lwp_rele(l);
return EFAULT;
}
up = (char *)vmaprange(p, (vaddr_t)udaddr, len, VM_PROT_READ);
@ -506,7 +504,6 @@ bigcopyin(const void *udaddr, void *kaddr, size_t len)
memcpy(kp, up, len);
vunmaprange((vaddr_t)up, len);
uvm_vsunlock(p->p_vmspace, __UNCONST(udaddr), len);
uvm_lwp_rele(l);
return 0;
}
@ -594,10 +591,8 @@ bigcopyout(const void *kaddr, void *udaddr, size_t len)
/*
* Stolen from physio():
*/
uvm_lwp_hold(l);
error = uvm_vslock(p->p_vmspace, udaddr, len, VM_PROT_WRITE);
if (error) {
uvm_lwp_rele(l);
return EFAULT;
}
up = (char *)vmaprange(p, (vaddr_t)udaddr, len,
@ -606,7 +601,6 @@ bigcopyout(const void *kaddr, void *udaddr, size_t len)
memcpy(up, kp, len);
vunmaprange((vaddr_t)up, len);
uvm_vsunlock(p->p_vmspace, udaddr, len);
uvm_lwp_rele(l);
return 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.65 2008/04/30 23:21:29 macallan Exp $ */
/* $NetBSD: cpu.h,v 1.66 2009/10/21 21:12:01 rmind Exp $ */
/*
* Copyright (C) 1999 Wolfgang Solfrank.
@ -303,8 +303,6 @@ cntlzw(uint32_t val)
#define LWP_PC(l) (trapframe(l)->srr0)
#define cpu_swapin(p)
#define cpu_swapout(p)
#define cpu_proc_fork(p1, p2)
#define cpu_idle() (curcpu()->ci_idlespin())
#define cpu_lwp_free2(l)

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.h,v 1.16 2009/04/21 21:29:59 cegger Exp $ */
/* $NetBSD: pmap.h,v 1.17 2009/10/21 21:12:01 rmind Exp $ */
/*-
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -73,7 +73,6 @@ struct pmap_ops {
void (*pmapop_destroy)(pmap_t);
void (*pmapop_copy)(pmap_t, pmap_t, vaddr_t, vsize_t, vaddr_t);
void (*pmapop_update)(pmap_t);
void (*pmapop_collect)(pmap_t);
int (*pmapop_enter)(pmap_t, vaddr_t, paddr_t, vm_prot_t, u_int);
void (*pmapop_remove)(pmap_t, vaddr_t, vaddr_t);
void (*pmapop_kenter_pa)(vaddr_t, paddr_t, vm_prot_t);
@ -158,7 +157,6 @@ extern const struct pmap_ops *pmapops;
#define pmap_destroy PMAPOPNAME(destroy)
#define pmap_copy PMAPOPNAME(copy)
#define pmap_update PMAPOPNAME(update)
#define pmap_collect PMAPOPNAME(collect)
#define pmap_enter PMAPOPNAME(enter)
#define pmap_remove PMAPOPNAME(remove)
#define pmap_kenter_pa PMAPOPNAME(kenter_pa)

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.66 2009/08/11 17:04:19 matt Exp $ */
/* $NetBSD: pmap.c,v 1.67 2009/10/21 21:12:02 rmind Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.66 2009/08/11 17:04:19 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.67 2009/10/21 21:12:02 rmind Exp $");
#define PMAP_NOOPNAMES
@ -170,7 +170,6 @@ static u_int mem_cnt, avail_cnt;
#define pmap_destroy PMAPNAME(destroy)
#define pmap_copy PMAPNAME(copy)
#define pmap_update PMAPNAME(update)
#define pmap_collect PMAPNAME(collect)
#define pmap_enter PMAPNAME(enter)
#define pmap_remove PMAPNAME(remove)
#define pmap_kenter_pa PMAPNAME(kenter_pa)
@ -217,7 +216,6 @@ STATIC void pmap_reference(pmap_t);
STATIC void pmap_destroy(pmap_t);
STATIC void pmap_copy(pmap_t, pmap_t, vaddr_t, vsize_t, vaddr_t);
STATIC void pmap_update(pmap_t);
STATIC void pmap_collect(pmap_t);
STATIC int pmap_enter(pmap_t, vaddr_t, paddr_t, vm_prot_t, u_int);
STATIC void pmap_remove(pmap_t, vaddr_t, vaddr_t);
STATIC void pmap_kenter_pa(vaddr_t, paddr_t, vm_prot_t);
@ -260,7 +258,6 @@ const struct pmap_ops PMAPNAME(ops) = {
.pmapop_destroy = pmap_destroy,
.pmapop_copy = pmap_copy,
.pmapop_update = pmap_update,
.pmapop_collect = pmap_collect,
.pmapop_enter = pmap_enter,
.pmapop_remove = pmap_remove,
.pmapop_kenter_pa = pmap_kenter_pa,
@ -1310,20 +1307,6 @@ pmap_update(struct pmap *pmap)
TLBSYNC();
}
/*
* Garbage collects the physical map system for
* pages which are no longer used.
* Success need not be guaranteed -- that is, there
* may well be pages which are not referenced, but
* others may be collected.
* Called by the pageout daemon when pages are scarce.
*/
void
pmap_collect(pmap_t pm)
{
PMAPCOUNT(collects);
}
static inline int
pmap_pvo_pte_index(const struct pvo_entry *pvo, int ptegidx)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.48 2008/07/02 19:49:58 rmind Exp $ */
/* $NetBSD: db_trace.c,v 1.49 2009/10/21 21:12:02 rmind Exp $ */
/* $OpenBSD: db_trace.c,v 1.3 1997/03/21 02:10:48 niklas Exp $ */
/*
@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.48 2008/07/02 19:49:58 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.49 2009/10/21 21:12:02 rmind Exp $");
#include "opt_ppcarch.h"
@ -150,10 +150,6 @@ db_stack_trace_print(db_expr_t addr, bool have_addr, db_expr_t count,
KASSERT(l != NULL);
}
(*pr)("lid %d ", l->l_lid);
if ((l->l_flag & LW_INMEM) == 0) {
(*pr)("swapped out\n");
return;
}
u = l->l_addr;
frame = (db_addr_t)u->u_pcb.pcb_sp;
(*pr)("at %p\n", frame);

View File

@ -1,4 +1,4 @@
/* $NetBSD: process_machdep.c,v 1.26 2007/10/17 19:56:48 garbled Exp $ */
/* $NetBSD: process_machdep.c,v 1.27 2009/10/21 21:12:02 rmind Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.26 2007/10/17 19:56:48 garbled Exp $");
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.27 2009/10/21 21:12:02 rmind Exp $");
#include "opt_altivec.h"
@ -233,8 +233,6 @@ process_machdep_dovecregs(struct lwp *curl, struct lwp *l, struct uio *uio)
if (kl > uio->uio_resid)
kl = uio->uio_resid;
uvm_lwp_hold(l);
if (kl < 0)
error = EINVAL;
else
@ -248,8 +246,6 @@ process_machdep_dovecregs(struct lwp *curl, struct lwp *l, struct uio *uio)
error = process_machdep_write_vecregs(l, &r);
}
uvm_lwp_rele(l);
uio->uio_offset = 0;
return (error);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.53 2008/03/22 03:23:27 uwe Exp $ */
/* $NetBSD: cpu.h,v 1.54 2009/10/21 21:12:02 rmind Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
@ -70,12 +70,7 @@ extern struct cpu_info cpu_info_store;
* referenced in generic code
*/
#define cpu_number() 0
/*
* Can't swapout u-area, (__SWAP_BROKEN)
* since we use P1 converted address for trapframe.
*/
#define cpu_swapin(p) /* nothing */
#define cpu_swapout(p) panic("cpu_swapout: can't get here");
#define cpu_proc_fork(p1, p2) /* nothing */
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.h,v 1.33 2008/12/09 20:45:45 pooka Exp $ */
/* $NetBSD: pmap.h,v 1.34 2009/10/21 21:12:02 rmind Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -57,7 +57,6 @@ void pmap_bootstrap(void);
void pmap_procwr(struct proc *, vaddr_t, size_t);
#define pmap_update(pmap) ((void)0)
#define pmap_copy(dp,sp,d,l,s) ((void)0)
#define pmap_collect(pmap) ((void)0)
#define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count)
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.27 2008/01/20 18:09:09 joerg Exp $ */
/* $NetBSD: types.h,v 1.28 2009/10/21 21:12:02 rmind Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -62,8 +62,6 @@ typedef volatile unsigned char __cpu_simple_lock_t;
#define __SIMPLELOCK_LOCKED 0x80
#define __SIMPLELOCK_UNLOCKED 0
#define __SWAP_BROKEN
#define __HAVE_AST_PERPROC
#define __HAVE_SYSCALL_INTERN

View File

@ -1,4 +1,4 @@
/* $NetBSD: process_machdep.c,v 1.16 2008/10/27 23:50:12 uwe Exp $ */
/* $NetBSD: process_machdep.c,v 1.17 2009/10/21 21:12:02 rmind Exp $ */
/*
* Copyright (c) 1993 The Regents of the University of California.
@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.16 2008/10/27 23:50:12 uwe Exp $");
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.17 2009/10/21 21:12:02 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -241,8 +241,6 @@ process_machdep_doregs40(struct lwp *curl, struct lwp *l, struct uio *uio)
if (kl > uio->uio_resid)
kl = uio->uio_resid;
uvm_lwp_hold(l);
if (kl < 0)
error = EINVAL;
else
@ -256,8 +254,6 @@ process_machdep_doregs40(struct lwp *curl, struct lwp *l, struct uio *uio)
error = process_machdep_write_regs40(l, &r);
}
uvm_lwp_rele(l);
uio->uio_offset = 0;
return error;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.86 2009/05/29 22:06:55 mrg Exp $ */
/* $NetBSD: cpu.h,v 1.87 2009/10/21 21:12:02 rmind Exp $ */
/*
* Copyright (c) 1992, 1993
@ -76,8 +76,6 @@
#define curlwp (cpuinfo.ci_curlwp)
#define CPU_IS_PRIMARY(ci) ((ci)->master)
#define cpu_swapin(p) /* nothing */
#define cpu_swapout(p) /* nothing */
#define cpu_number() (cpuinfo.ci_cpuid)
void cpu_proc_fork(struct proc *, struct proc *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.h,v 1.85 2009/08/16 14:06:36 skrll Exp $ */
/* $NetBSD: pmap.h,v 1.86 2009/10/21 21:12:02 rmind Exp $ */
/*
* Copyright (c) 1996
@ -252,7 +252,6 @@ void pmap_bootstrap(int nmmu, int nctx, int nregion);
void pmap_prefer(vaddr_t, vaddr_t *);
int pmap_pa_exists(paddr_t);
void pmap_unwire(pmap_t, vaddr_t);
void pmap_collect(pmap_t);
void pmap_copy(pmap_t, pmap_t, vaddr_t, vsize_t, vaddr_t);
pmap_t pmap_create(void);
void pmap_destroy(pmap_t);

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.30 2008/07/02 19:49:58 rmind Exp $ */
/* $NetBSD: db_trace.c,v 1.31 2009/10/21 21:12:02 rmind Exp $ */
/*
* Mach Operating System
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.30 2008/07/02 19:49:58 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.31 2009/10/21 21:12:02 rmind Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@ -95,10 +95,6 @@ db_stack_trace_print(db_expr_t addr, bool have_addr,
KASSERT(l != NULL);
}
(*pr)("lid %d ", l->l_lid);
if ((l->l_flag & LW_INMEM) == 0) {
(*pr)("swapped out\n");
return;
}
u = l->l_addr;
frame = (struct frame *)u->u_pcb.pcb_sp;
pc = u->u_pcb.pcb_pc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.334 2009/09/10 14:12:02 tsutsui Exp $ */
/* $NetBSD: pmap.c,v 1.335 2009/10/21 21:12:02 rmind Exp $ */
/*
* Copyright (c) 1996
@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.334 2009/09/10 14:12:02 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.335 2009/10/21 21:12:02 rmind Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@ -6850,20 +6850,6 @@ pmap_copy(struct pmap *dst_pmap, struct pmap *src_pmap,
#endif
}
/*
* Garbage collects the physical map system for
* pages which are no longer used.
* Success need not be guaranteed -- that is, there
* may well be pages which are not referenced, but
* others may be collected.
* Called by the pageout daemon when pages are scarce.
*/
/* ARGSUSED */
void
pmap_collect(struct pmap *pm)
{
}
#if defined(SUN4) || defined(SUN4C)
/*
* Clear the modify bit for the given physical page.

View File

@ -1,8 +1,8 @@
# $NetBSD: NONPLUS64,v 1.28 2009/03/06 20:31:52 joerg Exp $
# $NetBSD: NONPLUS64,v 1.29 2009/10/21 21:12:02 rmind Exp $
include "arch/sparc64/conf/std.sparc64"
#ident "NONPLUS64-$Revision: 1.28 $"
#ident "NONPLUS64-$Revision: 1.29 $"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
@ -16,7 +16,6 @@ maxusers 64
# We currently support three architecture types; at least one is required.
options SUN4U # sun4u - UltraSPARC
options __ELF__ # we use elf
#options __SWAP_BROKEN
makeoptions SPARC_BINARIES=1
#### System options that are the same for all ports

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.86 2009/05/30 16:52:32 martin Exp $ */
/* $NetBSD: cpu.h,v 1.87 2009/10/21 21:12:03 rmind Exp $ */
/*
* Copyright (c) 1992, 1993
@ -214,8 +214,6 @@ extern struct pool_cache *fpstate_cache;
* definitions of cpu-dependent requirements
* referenced in generic code
*/
#define cpu_swapin(p) /* nothing */
#define cpu_swapout(p) /* nothing */
#define cpu_wait(p) /* nothing */
void cpu_proc_fork(struct proc *, struct proc *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.41 2008/11/25 15:41:12 nakayama Exp $ */
/* $NetBSD: db_trace.c,v 1.42 2009/10/21 21:12:03 rmind Exp $ */
/*
* Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved.
@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.41 2008/11/25 15:41:12 nakayama Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.42 2009/10/21 21:12:03 rmind Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@ -101,11 +101,7 @@ db_stack_trace_print(addr, have_addr, count, modif, pr)
KASSERT(l != NULL);
}
(*pr)("lid %d ", l->l_lid);
if ((l->l_flag & LW_INMEM) == 0) {
(*pr)("swapped out\n");
return;
}
u = l->l_addr;
u = l->l_addr;
frame = (vaddr_t)u->u_pcb.pcb_sp;
(*pr)("at %p\n", frame);
} else {

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.244 2009/08/15 23:45:00 matt Exp $ */
/* $NetBSD: machdep.c,v 1.245 2009/10/21 21:12:03 rmind Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.244 2009/08/15 23:45:00 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.245 2009/10/21 21:12:03 rmind Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@ -1214,7 +1214,6 @@ _bus_dmamap_load_uio(bus_dma_tag_t t, bus_dmamap_t map, struct uio *uio,
* Lock the part of the user address space involved
* in the transfer.
*/
uvm_lwp_hold(p);
if (__predict_false(uvm_vslock(p->p_vmspace, vaddr, buflen,
(uio->uio_rw == UIO_WRITE) ?
VM_PROT_WRITE : VM_PROT_READ) != 0)) {
@ -1248,7 +1247,6 @@ _bus_dmamap_load_uio(bus_dma_tag_t t, bus_dmamap_t map, struct uio *uio,
i++;
}
uvm_vsunlock(p->p_vmspace, bp->b_data, todo);
uvm_lwp_rele(p);
if (buflen > 0 && i >= MAX_DMA_SEGS)
/* Exceeded the size of our dmamap */
return EFBIG;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.238 2009/08/15 23:45:00 matt Exp $ */
/* $NetBSD: pmap.c,v 1.239 2009/10/21 21:12:03 rmind Exp $ */
/*
*
* Copyright (C) 1996-1999 Eduardo Horvath.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.238 2009/08/15 23:45:00 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.239 2009/10/21 21:12:03 rmind Exp $");
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
#define HWREF
@ -1426,73 +1426,6 @@ pmap_copy(struct pmap *dst_pmap, struct pmap *src_pmap, vaddr_t dst_addr, vsize_
(u_long)len, (void *)(u_long)src_addr));
}
/*
* Garbage collects the physical map system for
* pages which are no longer used.
* Success need not be guaranteed -- that is, there
* may well be pages which are not referenced, but
* others may be collected.
* Called by the pageout daemon when pages are scarce.
*/
void
pmap_collect(struct pmap *pm)
{
int64_t data;
paddr_t pa, *pdir, *ptbl;
struct vm_page *pg;
int i, j, k, n, m;
/*
* This is a good place to scan the pmaps for page tables with
* no valid mappings in them and free them.
*/
/* NEVER GARBAGE COLLECT THE KERNEL PMAP */
if (pm == pmap_kernel())
return;
mutex_enter(&pmap_lock);
for (i = 0; i < STSZ; i++) {
pdir = (paddr_t *)(u_long)ldxa((vaddr_t)&pm->pm_segs[i],
ASI_PHYS_CACHED);
if (pdir == NULL) {
continue;
}
m = 0;
for (k = 0; k < PDSZ; k++) {
ptbl = (paddr_t *)(u_long)ldxa((vaddr_t)&pdir[k],
ASI_PHYS_CACHED);
if (ptbl == NULL) {
continue;
}
m++;
n = 0;
for (j = 0; j < PTSZ; j++) {
data = ldxa((vaddr_t)&ptbl[j], ASI_PHYS_CACHED);
if (data & TLB_V)
n++;
}
if (!n) {
stxa((paddr_t)(u_long)&pdir[k],
ASI_PHYS_CACHED, 0);
pa = (paddr_t)(u_long)ptbl;
pg = PHYS_TO_VM_PAGE(pa);
TAILQ_REMOVE(&pm->pm_obj.memq, pg, listq.queue);
pmap_free_page(pa);
}
}
if (!m) {
stxa((paddr_t)(u_long)&pm->pm_segs[i],
ASI_PHYS_CACHED, 0);
pa = (paddr_t)(u_long)pdir;
pg = PHYS_TO_VM_PAGE(pa);
TAILQ_REMOVE(&pm->pm_obj.memq, pg, listq.queue);
pmap_free_page(pa);
}
}
mutex_exit(&pmap_lock);
}
/*
* Activate the address space for the specified process. If the
* process is the current process, load the new MMU context.
@ -3014,7 +2947,6 @@ pmap_count_res(struct pmap *pm)
paddr_t *pdir, *ptbl;
int i, j, k, n;
/* Almost the same as pmap_collect() */
/* Don't want one of these pages reused while we're reading it. */
mutex_enter(&pmap_lock);
n = 0;
@ -3057,7 +2989,6 @@ pmap_count_wired(struct pmap *pm)
paddr_t *pdir, *ptbl;
int i, j, k, n;
/* Almost the same as pmap_collect() */
/* Don't want one of these pages reused while we're reading it. */
mutex_enter(&pmap_lock);
n = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.39 2009/04/21 21:30:00 cegger Exp $ */
/* $NetBSD: pmap.c,v 1.40 2009/10/21 21:12:03 rmind Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.39 2009/04/21 21:30:00 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.40 2009/10/21 21:12:03 rmind Exp $");
#include "opt_ddb.h"
#include "opt_pmap_debug.h"
@ -3687,22 +3687,6 @@ pmap_zero_page(paddr_t pa)
splx(s);
}
/*
* Routine: pmap_collect
* Function:
* Garbage collects the physical map system for
* pages which are no longer used.
* Success need not be guaranteed -- that is, there
* may well be pages which are not referenced, but
* others may be collected.
* Usage:
* Called by the pageout daemon when pages are scarce.
*/
void
pmap_collect(pmap_t pmap)
{
}
/*
* Find first virtual address >= *va that is
* least likely to cause cache aliases.

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.160 2009/04/21 21:30:00 cegger Exp $ */
/* $NetBSD: pmap.c,v 1.161 2009/10/21 21:12:03 rmind Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.160 2009/04/21 21:30:00 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.161 2009/10/21 21:12:03 rmind Exp $");
#include "opt_ddb.h"
#include "opt_pmap_debug.h"
@ -3625,22 +3625,6 @@ pmap_zero_page(paddr_t pa)
splx(s);
}
/*
* Routine: pmap_collect
* Function:
* Garbage collects the physical map system for
* pages which are no longer used.
* Success need not be guaranteed -- that is, there
* may well be pages which are not referenced, but
* others may be collected.
* Usage:
* Called by the pageout daemon when pages are scarce.
*/
void
pmap_collect(pmap_t pmap)
{
}
/*
* Find first virtual address >= *va that is
* least likely to cause cache aliases.

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.106 2009/08/11 17:04:20 matt Exp $ */
/* $NetBSD: pmap.c,v 1.107 2009/10/21 21:12:03 rmind Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -105,7 +105,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.106 2009/08/11 17:04:20 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.107 2009/10/21 21:12:03 rmind Exp $");
#include "opt_ddb.h"
#include "opt_pmap_debug.h"
@ -2519,19 +2519,6 @@ pmap_zero_page(paddr_t dstpa)
splx(s);
}
/* pmap_collect INTERFACE
**
* Called from the VM system when we are about to swap out
* the process using this pmap. This should give up any
* resources held here, including all its MMU tables.
*/
void
pmap_collect(pmap_t pmap)
{
/* XXX - todo... */
}
/* pmap_pinit INTERNAL
**
* Initialize a pmap structure.

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.20 2008/01/26 14:02:54 tsutsui Exp $ */
/* $NetBSD: cpu.h,v 1.21 2009/10/21 21:12:03 rmind Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@ -120,8 +120,6 @@ extern struct cpu_info cpu_info_store;
* referenced in generic code
*/
#define cpu_number() 0
#define cpu_swapin(p) /* nothing */
#define cpu_swapout(p) /* nothing */
void cpu_proc_fork(struct proc *, struct proc *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
/* $NetBSD: cpu.h,v 1.3 2009/10/21 21:12:04 rmind Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca>
@ -85,7 +85,4 @@ struct clockframe {
#define CLKF_PC(frame) 0
#define CLKF_INTR(frame) 0
#define cpu_swapin(l)
#define cpu_swapout(l)
#endif /* !_ARCH_USERMODE_INCLUDE_CPU_H */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.3 2009/10/21 16:07:00 snj Exp $ */
/* $NetBSD: pmap.c,v 1.4 2009/10/21 21:12:04 rmind Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca>
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.3 2009/10/21 16:07:00 snj Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.4 2009/10/21 21:12:04 rmind Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -193,11 +193,6 @@ pmap_copy(pmap_t dst_map, pmap_t src_map, vaddr_t dst_addr, vsize_t len,
{
}
void
pmap_collect(pmap_t pmap)
{
}
void
pmap_update(pmap_t pmap)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.h,v 1.76 2008/12/09 20:45:46 pooka Exp $ */
/* $NetBSD: pmap.h,v 1.77 2009/10/21 21:12:04 rmind Exp $ */
/*
* Copyright (c) 1991 Regents of the University of California.
@ -264,7 +264,6 @@ pmap_remove_all(struct pmap *pmap)
#define pmap_phys_address(phys) ((u_int)(phys) << PGSHIFT)
#define pmap_copy(a,b,c,d,e) /* Dont do anything */
#define pmap_update(pmap) /* nothing (yet) */
#define pmap_collect(pmap) /* No need so far */
#define pmap_remove(pmap, start, slut) pmap_protect(pmap, start, slut, 0)
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
#define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count)

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.175 2009/03/18 17:06:48 cegger Exp $ */
/* $NetBSD: machdep.c,v 1.176 2009/10/21 21:12:04 rmind Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.175 2009/03/18 17:06:48 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.176 2009/10/21 21:12:04 rmind Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@ -494,9 +494,6 @@ process_set_pc(struct lwp *l, void *addr)
struct trapframe *tf;
void *ptr;
if ((l->l_flag & LW_INMEM) == 0)
return (EIO);
ptr = (char *) l->l_addr->u_pcb.framep;
tf = ptr;
@ -511,9 +508,6 @@ process_sstep(struct lwp *l, int sstep)
void *ptr;
struct trapframe *tf;
if ((l->l_flag & LW_INMEM) == 0)
return (EIO);
ptr = l->l_addr->u_pcb.framep;
tf = ptr;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.168 2009/04/21 21:30:00 cegger Exp $ */
/* $NetBSD: pmap.c,v 1.169 2009/10/21 21:12:04 rmind Exp $ */
/*
* Copyright (c) 1994, 1998, 1999, 2003 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.168 2009/04/21 21:30:00 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.169 2009/10/21 21:12:04 rmind Exp $");
#include "opt_ddb.h"
#include "opt_cputype.h"
@ -675,16 +675,28 @@ rmspace(struct pmap *pm)
}
/*
* Find a process to remove the process space for.
* This is based on uvm_swapout_threads().
* Find a process to remove the process space for. *sigh*
* Avoid to remove ourselves.
*/
#undef swappable
#define swappable(l, pm) \
(((l)->l_flag & (LW_SYSTEM | LW_INMEM | LW_WEXIT)) == LW_INMEM \
&& (l)->l_holdcnt == 0 \
&& (l)->l_proc->p_vmspace->vm_map.pmap != pm)
static inline bool
pmap_vax_swappable(struct lwp *l)
{
if (l->l_flag & (LW_SYSTEM | LW_WEXIT))
return false;
if (l->l_proc->p_vmspace->vm_map.pmap == pm)
return false;
if ((l->l_pflag & LP_RUNNING) != 0)
return false;
if (l->l_class != SCHED_OTHER)
return false;
if (l->l_syncobj == &rw_syncobj || l->l_syncobj == &mutex_syncobj)
return false;
if (l->l_proc->p_stat != SACTIVE && l->l_proc->p_stat != SSTOP)
return false;
return true;
}
static int
pmap_rmproc(struct pmap *pm)
@ -700,7 +712,7 @@ pmap_rmproc(struct pmap *pm)
outpri = outpri2 = 0;
mutex_enter(proc_lock);
LIST_FOREACH(l, &alllwp, l_list) {
if (!swappable(l, pm))
if (!pmap_vax_swappable(l, pm))
continue;
ppm = l->l_proc->p_vmspace->vm_map.pmap;
if (ppm->pm_p0lr == 0 && ppm->pm_p1lr == NPTEPERREG)
@ -1825,39 +1837,3 @@ free_ptp(paddr_t v)
*(int *)v = (int)ptpp;
ptpp = (int *)v;
}
/*
* Called when a process is about to be swapped, to remove the page tables.
*/
void
cpu_swapout(struct lwp *l)
{
struct proc *p = l->l_proc;
pmap_t pm;
PMDEBUG(("Swapout pid %d\n", p->p_pid));
pm = p->p_vmspace->vm_map.pmap;
rmspace(pm);
pmap_deactivate(l);
}
/*
* Kernel stack red zone need to be set when a process is swapped in.
* Be sure that all pages are valid.
*/
void
cpu_swapin(struct lwp *l)
{
struct pte *pte;
int i;
PMDEBUG(("Swapin pid %d.%d\n", l->l_proc->p_pid, l->l_lid));
pte = kvtopte((vaddr_t)l->l_addr);
for (i = 0; i < (USPACE/VAX_NBPG); i ++)
pte[i].pg_v = 1;
l->l_addr->u_pcb.pcb_paddr = kvtophys(l->l_addr);
kvtopte((vaddr_t)l->l_addr + REDZONEADDR)->pg_v = 0;
pmap_activate(l);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.48 2009/01/17 09:20:46 isaki Exp $ */
/* $NetBSD: cpu.h,v 1.49 2009/10/21 21:12:04 rmind Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@ -118,8 +118,6 @@ extern struct cpu_info cpu_info_store;
* definitions of cpu-dependent requirements
* referenced in generic code
*/
#define cpu_swapin(p) /* nothing */
#define cpu_swapout(p) /* nothing */
#define cpu_number() 0
void cpu_proc_fork(struct proc *, struct proc *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.92 2009/10/19 18:41:10 bouyer Exp $ */
/* $NetBSD: pmap.c,v 1.93 2009/10/21 21:12:04 rmind Exp $ */
/*
* Copyright (c) 2007 Manuel Bouyer.
@ -149,7 +149,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.92 2009/10/19 18:41:10 bouyer Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.93 2009/10/21 21:12:04 rmind Exp $");
#include "opt_user_ldt.h"
#include "opt_lockdebug.h"
@ -258,10 +258,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.92 2009/10/19 18:41:10 bouyer Exp $");
* if the kernel is totally out of virtual space
* (i.e. uvm_km_alloc returns NULL), then we panic.
*
* XXX: the fork code currently has no way to return an "out of
* memory, try again" error code since uvm_fork [fka vm_fork]
* is a void function.
*
* [B] new page tables pages (PTP)
* - call uvm_pagealloc()
* => success: zero page, add to pm_pdir
@ -2934,9 +2930,8 @@ pmap_extract(struct pmap *pmap, vaddr_t va, paddr_t *pap)
* own pmap and is active. if a user pmap, the caller
* will hold the vm_map write/read locked and so prevent
* entries from disappearing while we are here. ptps
* can disappear via pmap_remove(), pmap_protect() and
* pmap_collect(), but they are called with the vm_map
* write locked.
* can disappear via pmap_remove() and pmap_protect(),
* but they are called with the vm_map write locked.
*/
hard = false;
ptes = PTE_BASE;
@ -3998,25 +3993,6 @@ pmap_unwire(struct pmap *pmap, vaddr_t va)
kpreempt_enable();
}
/*
* pmap_collect: free resources held by a pmap
*
* => optional function.
* => called when a process is swapped out to free memory.
*/
void
pmap_collect(struct pmap *pmap)
{
/*
* free all of the pt pages by removing the physical mappings
* for its entire address space.
*/
pmap_do_remove(pmap, VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS,
PMAP_REMOVE_SKIPWIRED);
}
/*
* pmap_copy: copy mappings from one pmap to another
*

View File

@ -1,4 +1,4 @@
/* $NetBSD: syscall.c,v 1.1 2009/04/16 15:34:23 rmind Exp $ */
/* $NetBSD: syscall.c,v 1.2 2009/10/21 21:12:04 rmind Exp $ */
/*-
* Copyright (c) 1998, 2000, 2009 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.1 2009/04/16 15:34:23 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.2 2009/10/21 21:12:04 rmind Exp $");
#include "opt_sa.h"
@ -149,7 +149,6 @@ syscall(struct trapframe *frame)
|| (error = trace_enter(code, args, callp->sy_narg)) == 0) {
rval[0] = 0;
rval[1] = 0;
KASSERT(l->l_holdcnt == 0);
error = sy_call(callp, l, args, rval);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.1 2009/03/30 22:20:55 rmind Exp $ */
/* $NetBSD: vm_machdep.c,v 1.2 2009/10/21 21:12:04 rmind Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.1 2009/03/30 22:20:55 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.2 2009/10/21 21:12:04 rmind Exp $");
#include "opt_mtrr.h"
@ -246,23 +246,6 @@ cpu_setfunc(struct lwp *l, void (*func)(void *), void *arg)
#endif
}
void
cpu_swapin(struct lwp *l)
{
setredzone(l);
}
void
cpu_swapout(struct lwp *l)
{
/*
* Make sure we save the FP state before the user area vanishes.
*/
fpusave_lwp(l, true);
}
/*
* cpu_lwp_free is called from exit() to let machine-dependent
* code free machine-dependent resources. Note that this routine
@ -305,7 +288,7 @@ setredzone(struct lwp *l)
vaddr_t addr;
addr = USER_TO_UAREA(l->l_addr);
pmap_remove(pmap_kernel(), addr, addr + PAGE_SIZE);
pmap_kremove(addr, PAGE_SIZE);
pmap_update(pmap_kernel());
#endif
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_ptrace.c,v 1.23 2008/12/17 20:51:33 cegger Exp $ */
/* $NetBSD: linux_ptrace.c,v 1.24 2009/10/21 21:12:04 rmind Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.23 2008/12/17 20:51:33 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.24 2009/10/21 21:12:04 rmind Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@ -292,7 +292,6 @@ linux_sys_ptrace_arch(struct lwp *l, const struct linux_sys_ptrace_args *uap, re
case LINUX_PTRACE_PEEKUSR:
addr = SCARG(uap, addr);
uvm_lwp_hold(lt); /* need full process info */
error = 0;
if (addr < LUSR_OFF(lusr_startgdb)) {
/* XXX should provide appropriate register */
@ -336,9 +335,6 @@ linux_sys_ptrace_arch(struct lwp *l, const struct linux_sys_ptrace_args *uap, re
#endif
error = 1;
}
uvm_lwp_rele(lt);
if (!error)
return 0;
@ -354,9 +350,7 @@ linux_sys_ptrace_arch(struct lwp *l, const struct linux_sys_ptrace_args *uap, re
if (t->p_emul != &emul_linux)
return EINVAL;
uvm_lwp_hold(lt);
((struct linux_emuldata *)t->p_emuldata)->debugreg[off] = data;
uvm_lwp_rele(lt);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_ptrace.c,v 1.21 2008/12/17 20:51:33 cegger Exp $ */
/* $NetBSD: linux_ptrace.c,v 1.22 2009/10/21 21:12:05 rmind Exp $ */
/*-
* Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.21 2008/12/17 20:51:33 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.22 2009/10/21 21:12:05 rmind Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@ -254,7 +254,6 @@ linux_sys_ptrace_arch(struct lwp *l, const struct linux_sys_ptrace_args *uap, re
if (error)
goto out;
uvm_lwp_hold(lt); /* need full process info */
error = 0;
if ((addr < LUSR_OFF(lusr_startgdb)) ||
(addr > LUSR_OFF(lu_comm_end)))
@ -297,8 +296,6 @@ linux_sys_ptrace_arch(struct lwp *l, const struct linux_sys_ptrace_args *uap, re
error = 1;
}
uvm_lwp_rele(lt);
if (error)
goto out;
@ -317,7 +314,6 @@ linux_sys_ptrace_arch(struct lwp *l, const struct linux_sys_ptrace_args *uap, re
if (error)
goto out;
uvm_lwp_hold(lt); /* need full process info */
error = 0;
if ((addr < LUSR_OFF(lusr_startgdb)) ||
(addr > LUSR_OFF(lu_comm_end)))
@ -359,8 +355,6 @@ linux_sys_ptrace_arch(struct lwp *l, const struct linux_sys_ptrace_args *uap, re
error = 1;
}
uvm_lwp_rele(lt);
error = process_write_regs(lt,regs);
if (error)
goto out;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mach_thread.c,v 1.48 2008/10/15 06:51:19 wrstuden Exp $ */
/* $NetBSD: mach_thread.c,v 1.49 2009/10/21 21:12:05 rmind Exp $ */
/*-
* Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mach_thread.c,v 1.48 2008/10/15 06:51:19 wrstuden Exp $");
__KERNEL_RCSID(0, "$NetBSD: mach_thread.c,v 1.49 2009/10/21 21:12:05 rmind Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -174,7 +174,6 @@ mach_thread_create_running(struct mach_trap_args *args)
vaddr_t uaddr;
int flags;
int error;
int inmem;
int end_offset;
/* Sanity check req_count */
@ -190,16 +189,16 @@ mach_thread_create_running(struct mach_trap_args *args)
mctc.mctc_child_done = 0;
mctc.mctc_state = req->req_state;
inmem = uvm_uarea_alloc(&uaddr);
if (__predict_false(uaddr == 0))
return (ENOMEM);
uaddr = uvm_uarea_alloc();
if (__predict_false(uaddr == 0))
return ENOMEM;
flags = 0;
if ((error = lwp_create(l, p, uaddr, inmem, flags, NULL, 0,
if ((error = lwp_create(l, p, uaddr, flags, NULL, 0,
mach_create_thread_child, (void *)&mctc, &mctc.mctc_lwp,
SCHED_OTHER)) != 0)
{
uvm_uarea_free(uaddr, curcpu());
uvm_uarea_free(uaddr);
return mach_msg_error(args, error);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: compat_sa.c,v 1.11 2009/09/13 18:45:10 pooka Exp $ */
/* $NetBSD: compat_sa.c,v 1.12 2009/10/21 21:12:05 rmind Exp $ */
/*-
* Copyright (c) 2001, 2004, 2005, 2006 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
#include "opt_ktrace.h"
#include "opt_multiprocessor.h"
#include "opt_sa.h"
__KERNEL_RCSID(0, "$NetBSD: compat_sa.c,v 1.11 2009/09/13 18:45:10 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: compat_sa.c,v 1.12 2009/10/21 21:12:05 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -906,7 +906,6 @@ sa_increaseconcurrency(struct lwp *l, int concurrency)
}
/* Run the LWP, locked since its mutex is still savp_mutex */
sa_setrunning(l2);
uvm_lwp_rele(l2);
mutex_exit(&vp->savp_mutex);
mutex_enter(&sa->sa_mutex);
@ -1618,7 +1617,7 @@ sa_switch(struct lwp *l)
if ((l->l_flag & LP_SA_PAGEFAULT) && sa_pagefault(l,
&sau->sau_event.ss_captured.ss_ctx) != 0) {
cpu_setfunc(l2, sa_neverrun, NULL);
sa_putcachelwp(p, l2); /* uvm_lwp_hold from sa_getcachelwp */
sa_putcachelwp(p, l2);
mutex_exit(&vp->savp_mutex);
DPRINTFN(4,("sa_switch(%d.%d) Pagefault\n",
p->p_pid, l->l_lid));
@ -1649,9 +1648,6 @@ sa_switch(struct lwp *l)
sa_setrunning(l2);
/* Remove the artificial hold-count */
uvm_lwp_rele(l2);
KASSERT(l2 != l);
} else if (vp->savp_lwp != NULL) {
@ -1776,7 +1772,7 @@ sa_switchcall(void *arg)
vp->savp_sleeper_upcall = sau;
else
sadata_upcall_free(sau);
uvm_lwp_hold(l2);
sa_putcachelwp(p, l2); /* sets LW_SA */
mutex_exit(&vp->savp_mutex);
lwp_lock(l);
@ -1820,22 +1816,20 @@ sa_newcachelwp(struct lwp *l, struct sadata_vp *targ_vp)
struct lwp *l2;
struct sadata_vp *vp;
vaddr_t uaddr;
boolean_t inmem;
int error;
p = l->l_proc;
if (p->p_sflag & (PS_WCORE | PS_WEXIT))
return (0);
inmem = uvm_uarea_alloc(&uaddr);
if (__predict_false(uaddr == 0)) {
return (ENOMEM);
}
uaddr = uvm_uarea_alloc();
if (__predict_false(uaddr == 0))
return ENOMEM;
error = lwp_create(l, p, uaddr, inmem, 0, NULL, 0,
error = lwp_create(l, p, uaddr, 0, NULL, 0,
sa_neverrun, NULL, &l2, l->l_class);
if (error) {
uvm_uarea_free(uaddr, curcpu());
uvm_uarea_free(uaddr);
return error;
}
@ -1846,7 +1840,7 @@ sa_newcachelwp(struct lwp *l, struct sadata_vp *targ_vp)
mutex_enter(p->p_lock);
p->p_nrlwps++;
mutex_exit(p->p_lock);
uvm_lwp_hold(l2);
vp = (targ_vp) ? targ_vp : l->l_savp;
mutex_enter(&vp->savp_mutex);
l2->l_savp = vp;
@ -2117,7 +2111,7 @@ sa_upcall_userret(struct lwp *l)
l2->l_wmesg = sa_lwpcache_wmesg;
vp->savp_lwpcache_count++;
sleepq_insert(sq, l2, &sa_sobj);
/* uvm_lwp_hold from sa_unblock_userret */
} else if (sast)
sa_setstackfree(sast, sa);
@ -2311,7 +2305,6 @@ sa_makeupcalls(struct lwp *l, struct sadata_upcall *sau)
l2->l_wmesg = sa_lwpcache_wmesg;
vp->savp_lwpcache_count++;
sleepq_insert(sq, l2, &sa_sobj);
/* uvm_lwp_hold from sa_unblock_userret */
mutex_exit(&vp->savp_mutex);
error = copyout(&e_ss->ss_captured.ss_ctx,
@ -2411,7 +2404,6 @@ sa_unblock_userret(struct lwp *l)
struct proc *p;
struct sadata *sa;
struct sadata_vp *vp;
int swapper;
p = l->l_proc;
sa = p->p_sa;
@ -2431,7 +2423,6 @@ sa_unblock_userret(struct lwp *l)
vp = l->l_savp;
vp_lwp = vp->savp_lwp;
l2 = NULL;
swapper = 0;
KASSERT(vp_lwp != NULL);
DPRINTFN(3,("sa_unblock_userret(%d.%d) woken, flags %x, vp %d\n",
@ -2447,7 +2438,6 @@ sa_unblock_userret(struct lwp *l)
l->l_proc->p_pid, l->l_lid,
vp_lwp->l_lid, vp_lwp->l_stat));
vp_lwp->l_flag &= ~LW_SA_IDLE;
uvm_lwp_rele(l);
return;
}
#endif
@ -2512,21 +2502,18 @@ sa_unblock_userret(struct lwp *l)
}
#endif
vp_lwp->l_slptime = 0;
if (vp_lwp->l_flag & LW_INMEM) {
if (vp_lwp->l_cpu == curcpu())
l2 = vp_lwp;
else {
/*
* don't need to spc_lock the other cpu
* as runable lwps have the cpu as their
* mutex.
*/
/* spc_lock(vp_lwp->l_cpu); */
cpu_need_resched(vp_lwp->l_cpu, 0);
/* spc_unlock(vp_lwp->l_cpu); */
}
} else
swapper = 1;
if (vp_lwp->l_cpu == curcpu())
l2 = vp_lwp;
else {
/*
* don't need to spc_lock the other cpu
* as runable lwps have the cpu as their
* mutex.
*/
/* spc_lock(vp_lwp->l_cpu); */
cpu_need_resched(vp_lwp->l_cpu, 0);
/* spc_unlock(vp_lwp->l_cpu); */
}
break;
default:
panic("sa_vp LWP not sleeping/onproc/runnable");
@ -2535,9 +2522,6 @@ sa_unblock_userret(struct lwp *l)
if (vp_lwp != NULL)
lwp_unlock(vp_lwp);
if (swapper)
wakeup(&proc0);
/*
* Add ourselves to the savp_woken queue. Still on p_lwps.
*
@ -2547,7 +2531,6 @@ sa_unblock_userret(struct lwp *l)
sleepq_enter(&vp->savp_woken, l, &vp->savp_mutex);
sleepq_enqueue(&vp->savp_woken, &vp->savp_woken, sa_lwpwoken_wmesg,
&sa_sobj);
uvm_lwp_hold(l);
vp->savp_woken_count++;
//l->l_stat = LSSUSPENDED;
mi_switch(l);

View File

@ -1,4 +1,4 @@
# $NetBSD: std,v 1.12 2009/08/10 11:46:42 simonb Exp $
# $NetBSD: std,v 1.13 2009/10/21 21:12:05 rmind Exp $
#
# standard MI 'options'
#
@ -8,7 +8,6 @@
# the following options are on-by-default to keep
# kernel config file compatibility.
options VMSWAP # Swap device/file support
options VMSWAP_UAREA # Swap uarea's
options BUFQ_FCFS # First-come First-serve strategy
options BUFQ_DISKSORT # Traditional min seek sort strategy
options RFC2292 # Previous version of Adv. Sockets API for IPv6

View File

@ -1,4 +1,4 @@
/* $NetBSD: iop.c,v 1.76 2009/05/12 14:23:47 cegger Exp $ */
/* $NetBSD: iop.c,v 1.77 2009/10/21 21:12:05 rmind Exp $ */
/*-
* Copyright (c) 2000, 2001, 2002, 2007 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.76 2009/05/12 14:23:47 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.77 2009/10/21 21:12:05 rmind Exp $");
#include "iop.h"
@ -1091,9 +1091,7 @@ iop_hrt_get(struct iop_softc *sc)
struct i2o_hrt hrthdr, *hrt;
int size, rv;
uvm_lwp_hold(curlwp);
rv = iop_hrt_get0(sc, &hrthdr, sizeof(hrthdr));
uvm_lwp_rele(curlwp);
if (rv != 0)
return (rv);
@ -1266,17 +1264,11 @@ iop_field_get_all(struct iop_softc *sc, int tid, int group, void *buf,
pgop->oat.fieldcount = htole16(0xffff);
pgop->oat.group = htole16(group);
if (ii == NULL)
uvm_lwp_hold(curlwp);
memset(buf, 0, size);
iop_msg_map(sc, im, mb, pgop, sizeof(*pgop), 1, NULL);
iop_msg_map(sc, im, mb, buf, size, 0, NULL);
rv = iop_msg_post(sc, im, mb, (ii == NULL ? 30000 : 0));
if (ii == NULL)
uvm_lwp_rele(curlwp);
/* Detect errors; let partial transfers to count as success. */
if (ii == NULL && rv == 0) {
if (im->im_reqstatus == I2O_STATUS_ERROR_PARTIAL_XFER &&
@ -1375,7 +1367,6 @@ iop_table_clear(struct iop_softc *sc, int tid, int group)
pgop.oat.group = htole16(group);
pgop.oat.fields[0] = htole16(0);
uvm_lwp_hold(curlwp);
iop_msg_map(sc, im, mb, &pgop, sizeof(pgop), 1, NULL);
rv = iop_msg_post(sc, im, mb, 30000);
if (rv != 0)
@ -1383,7 +1374,6 @@ iop_table_clear(struct iop_softc *sc, int tid, int group)
tid, group);
iop_msg_unmap(sc, im);
uvm_lwp_rele(curlwp);
iop_msg_free(sc, im);
return (rv);
}
@ -1512,14 +1502,12 @@ iop_systab_set(struct iop_softc *sc)
}
}
uvm_lwp_hold(curlwp);
iop_msg_map(sc, im, mb, iop_systab, iop_systab_size, 1, NULL);
iop_msg_map(sc, im, mb, mema, sizeof(mema), 1, NULL);
iop_msg_map(sc, im, mb, ioa, sizeof(ioa), 1, NULL);
rv = iop_msg_post(sc, im, mb, 5000);
iop_msg_unmap(sc, im);
iop_msg_free(sc, im);
uvm_lwp_rele(curlwp);
return (rv);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: dpt.c,v 1.62 2008/06/08 12:43:51 tsutsui Exp $ */
/* $NetBSD: dpt.c,v 1.63 2009/10/21 21:12:05 rmind Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.62 2008/06/08 12:43:51 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.63 2009/10/21 21:12:05 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1339,7 +1339,6 @@ dpt_passthrough(struct dpt_softc *sc, struct eata_ucp *ucp, struct lwp *l)
/*
* Start the command and sleep on completion.
*/
uvm_lwp_hold(curlwp);
bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, CCB_OFF(sc, ccb),
sizeof(struct dpt_ccb), BUS_DMASYNC_PREWRITE);
s = splbio();
@ -1349,7 +1348,6 @@ dpt_passthrough(struct dpt_softc *sc, struct eata_ucp *ucp, struct lwp *l)
panic("%s: dpt_cmd failed", device_xname(&sc->sc_dv));
tsleep(ccb, PWAIT, "dptucmd", 0);
splx(s);
uvm_lwp_rele(curlwp);
/*
* Sync up the DMA map and copy out results.

View File

@ -1,4 +1,4 @@
/* $NetBSD: rrunner.c,v 1.71 2009/04/15 20:44:25 elad Exp $ */
/* $NetBSD: rrunner.c,v 1.72 2009/10/21 21:12:05 rmind Exp $ */
/*
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rrunner.c,v 1.71 2009/04/15 20:44:25 elad Exp $");
__KERNEL_RCSID(0, "$NetBSD: rrunner.c,v 1.72 2009/10/21 21:12:05 rmind Exp $");
#include "opt_inet.h"
@ -1015,8 +1015,6 @@ esh_fpread(dev_t dev, struct uio *uio, int ioflag)
}
}
uvm_lwp_hold(l); /* Lock process info into memory */
/* Lock down the pages */
for (i = 0; i < uio->uio_iovcnt; i++) {
iovp = &uio->uio_iov[i];
@ -1118,8 +1116,6 @@ esh_fpread(dev_t dev, struct uio *uio, int ioflag)
iovp = &uio->uio_iov[i];
uvm_vsunlock(p->p_vmspace, iovp->iov_base, iovp->iov_len);
}
uvm_lwp_rele(l); /* Release process info */
esh_free_dmainfo(sc, di);
fpread_done:
@ -1173,8 +1169,6 @@ esh_fpwrite(dev_t dev, struct uio *uio, int ioflag)
}
}
uvm_lwp_hold(l); /* Lock process info into memory */
/* Lock down the pages */
for (i = 0; i < uio->uio_iovcnt; i++) {
iovp = &uio->uio_iov[i];
@ -1273,7 +1267,6 @@ esh_fpwrite(dev_t dev, struct uio *uio, int ioflag)
uvm_vsunlock(p->p_vmspace, iovp->iov_base, iovp->iov_len);
}
uvm_lwp_rele(l); /* Release process info */
esh_free_dmainfo(sc, di);
fpwrite_done:

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd.c,v 1.294 2009/07/26 15:29:00 reinoud Exp $ */
/* $NetBSD: cd.c,v 1.295 2009/10/21 21:12:05 rmind Exp $ */
/*-
* Copyright (c) 1998, 2001, 2003, 2004, 2005, 2008 The NetBSD Foundation,
@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.294 2009/07/26 15:29:00 reinoud Exp $");
__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.295 2009/10/21 21:12:05 rmind Exp $");
#include "rnd.h"
@ -1178,8 +1178,7 @@ cdreadmsaddr(struct cd_softc *cd, struct cd_formatted_toc *toc, int *addr)
error = cd_read_toc(cd, CD_TOC_FORM, 0, 0, toc,
sizeof(struct ioc_toc_header) + sizeof(struct cd_toc_entry),
XS_CTL_DATA_ONSTACK,
0x40 /* control word for "get MS info" */);
0, 0x40 /* control word for "get MS info" */);
if (error)
return (error);
@ -1239,7 +1238,7 @@ do_cdioreadentries(struct cd_softc *cd, struct ioc_read_toc_entry *te,
error = cd_read_toc(cd, CD_TOC_FORM, te->address_format,
te->starting_track, toc,
sizeof(toc->header) + len,
XS_CTL_DATA_ONSTACK, 0);
0, 0);
if (error)
return (error);
if (te->address_format == CD_LBA_FORMAT)
@ -1453,8 +1452,7 @@ cdioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
len < sizeof(struct cd_sub_channel_header))
return (EINVAL);
error = cd_read_subchannel(cd, args->address_format,
args->data_format, args->track, &data, len,
XS_CTL_DATA_ONSTACK);
args->data_format, args->track, &data, len, 0);
if (error)
return (error);
len = min(len, _2btol(data.header.data_len) +
@ -1468,13 +1466,12 @@ cdioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
return EINVAL;
return cd_read_subchannel(cd, args->req.address_format,
args->req.data_format, args->req.track, &args->info,
sizeof args->info, XS_CTL_DATA_ONSTACK);
sizeof(args->info), 0);
}
case CDIOREADTOCHEADER: {
/* READ TOC format 0 command, static header */
if ((error = cd_read_toc(cd, CD_TOC_FORM, 0, 0,
&toc, sizeof(toc.header),
XS_CTL_DATA_ONSTACK, 0)) != 0)
&toc, sizeof(toc.header), 0, 0)) != 0)
return (error);
if (cd->sc_periph->periph_quirks & PQUIRK_LITTLETOC)
toc.header.len = le16toh(toc.header.len);
@ -1805,7 +1802,7 @@ read_cd_capacity(struct scsipi_periph *periph, u_int *blksize, u_long *size)
/* first try read CD capacity for blksize and recorded size */
/* issue the cd capacity request */
flags = XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK;
flags = XS_CTL_DATA_IN;
memset(&cap_cmd, 0, sizeof(cap_cmd));
cap_cmd.opcode = READ_CD_CAPACITY;
@ -1825,7 +1822,7 @@ read_cd_capacity(struct scsipi_periph *periph, u_int *blksize, u_long *size)
*blksize = 2048; /* some drives lie ! */
/* recordables have READ_DISCINFO implemented */
flags = XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK | XS_CTL_SILENT;
flags = XS_CTL_DATA_IN | XS_CTL_SILENT;
memset(&di_cmd, 0, sizeof(di_cmd));
di_cmd.opcode = READ_DISCINFO;
_lto2b(READ_DISCINFO_BIGSIZE, di_cmd.data_len);
@ -1931,7 +1928,7 @@ cd_play_tracks(struct cd_softc *cd, struct cd_formatted_toc *toc, int strack,
if (strack > etrack)
return (EINVAL);
error = cd_load_toc(cd, CD_TOC_FORM, toc, XS_CTL_DATA_ONSTACK);
error = cd_load_toc(cd, CD_TOC_FORM, toc, 0);
if (error)
return (error);
@ -2126,8 +2123,7 @@ dvd_auth(struct cd_softc *cd, dvd_authinfo *a)
cmd.bytes[8] = 8;
cmd.bytes[9] = 0 | (0 << 6);
error = scsipi_command(cd->sc_periph, &cmd, 12, bf, 8,
CDRETRIES, 30000, NULL,
XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
CDRETRIES, 30000, NULL, XS_CTL_DATA_IN);
if (error)
return (error);
a->lsa.agid = bf[7] >> 6;
@ -2138,8 +2134,7 @@ dvd_auth(struct cd_softc *cd, dvd_authinfo *a)
cmd.bytes[8] = 16;
cmd.bytes[9] = 1 | (a->lsc.agid << 6);
error = scsipi_command(cd->sc_periph, &cmd, 12, bf, 16,
CDRETRIES, 30000, NULL,
XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
CDRETRIES, 30000, NULL, XS_CTL_DATA_IN);
if (error)
return (error);
dvd_copy_challenge(a->lsc.chal, &bf[4]);
@ -2150,8 +2145,7 @@ dvd_auth(struct cd_softc *cd, dvd_authinfo *a)
cmd.bytes[8] = 12;
cmd.bytes[9] = 2 | (a->lsk.agid << 6);
error = scsipi_command(cd->sc_periph, &cmd, 12, bf, 12,
CDRETRIES, 30000, NULL,
XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
CDRETRIES, 30000, NULL, XS_CTL_DATA_IN);
if (error)
return (error);
dvd_copy_key(a->lsk.key, &bf[4]);
@ -2163,8 +2157,7 @@ dvd_auth(struct cd_softc *cd, dvd_authinfo *a)
cmd.bytes[8] = 12;
cmd.bytes[9] = 4 | (a->lstk.agid << 6);
error = scsipi_command(cd->sc_periph, &cmd, 12, bf, 12,
CDRETRIES, 30000, NULL,
XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
CDRETRIES, 30000, NULL, XS_CTL_DATA_IN);
if (error)
return (error);
a->lstk.cpm = (bf[4] >> 7) & 1;
@ -2178,8 +2171,7 @@ dvd_auth(struct cd_softc *cd, dvd_authinfo *a)
cmd.bytes[8] = 8;
cmd.bytes[9] = 5 | (a->lsasf.agid << 6);
error = scsipi_command(cd->sc_periph, &cmd, 12, bf, 8,
CDRETRIES, 30000, NULL,
XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
CDRETRIES, 30000, NULL, XS_CTL_DATA_IN);
if (error)
return (error);
a->lsasf.asf = bf[7] & 1;
@ -2192,8 +2184,7 @@ dvd_auth(struct cd_softc *cd, dvd_authinfo *a)
bf[1] = 14;
dvd_copy_challenge(&bf[4], a->hsc.chal);
error = scsipi_command(cd->sc_periph, &cmd, 12, bf, 16,
CDRETRIES, 30000, NULL,
XS_CTL_DATA_OUT|XS_CTL_DATA_ONSTACK);
CDRETRIES, 30000, NULL, XS_CTL_DATA_OUT);
if (error)
return (error);
a->type = DVD_LU_SEND_KEY1;
@ -2206,8 +2197,7 @@ dvd_auth(struct cd_softc *cd, dvd_authinfo *a)
bf[1] = 10;
dvd_copy_key(&bf[4], a->hsk.key);
error = scsipi_command(cd->sc_periph, &cmd, 12, bf, 12,
CDRETRIES, 30000, NULL,
XS_CTL_DATA_OUT|XS_CTL_DATA_ONSTACK);
CDRETRIES, 30000, NULL, XS_CTL_DATA_OUT);
if (error) {
a->type = DVD_AUTH_FAILURE;
return (error);
@ -2229,8 +2219,7 @@ dvd_auth(struct cd_softc *cd, dvd_authinfo *a)
cmd.bytes[8] = 8;
cmd.bytes[9] = 8 | (0 << 6);
error = scsipi_command(cd->sc_periph, &cmd, 12, bf, 8,
CDRETRIES, 30000, NULL,
XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
CDRETRIES, 30000, NULL, XS_CTL_DATA_IN);
if (error)
return (error);
a->lrpcs.type = (bf[4] >> 6) & 3;
@ -2247,8 +2236,7 @@ dvd_auth(struct cd_softc *cd, dvd_authinfo *a)
bf[1] = 6;
bf[4] = a->hrpcs.pdrc;
error = scsipi_command(cd->sc_periph, &cmd, 12, bf, 8,
CDRETRIES, 30000, NULL,
XS_CTL_DATA_OUT|XS_CTL_DATA_ONSTACK);
CDRETRIES, 30000, NULL, XS_CTL_DATA_OUT);
if (error)
return (error);
return (0);
@ -2275,7 +2263,7 @@ dvd_read_physical(struct cd_softc *cd, dvd_struct *s)
cmd.bytes[5] = s->physical.layer_num;
error = scsipi_command(cd->sc_periph, &cmd, 12, bf, sizeof(bf),
CDRETRIES, 30000, NULL, XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
CDRETRIES, 30000, NULL, XS_CTL_DATA_IN);
if (error)
return (error);
for (i = 0, bufp = &bf[4], layer = &s->physical.layer[0]; i < 4;
@ -2313,7 +2301,7 @@ dvd_read_copyright(struct cd_softc *cd, dvd_struct *s)
cmd.bytes[5] = s->copyright.layer_num;
error = scsipi_command(cd->sc_periph, &cmd, 12, bf, sizeof(bf),
CDRETRIES, 30000, NULL, XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
CDRETRIES, 30000, NULL, XS_CTL_DATA_IN);
if (error)
return (error);
s->copyright.cpst = bf[4];
@ -2338,7 +2326,7 @@ dvd_read_disckey(struct cd_softc *cd, dvd_struct *s)
cmd.bytes[9] = s->disckey.agid << 6;
error = scsipi_command(cd->sc_periph, &cmd, 12, bf, 4 + 2048,
CDRETRIES, 30000, NULL, XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
CDRETRIES, 30000, NULL, XS_CTL_DATA_IN);
if (error == 0)
memcpy(s->disckey.value, &bf[4], 2048);
free(bf, M_TEMP);
@ -2359,7 +2347,7 @@ dvd_read_bca(struct cd_softc *cd, dvd_struct *s)
_lto2b(sizeof(bf), &cmd.bytes[7]);
error = scsipi_command(cd->sc_periph, &cmd, 12, bf, sizeof(bf),
CDRETRIES, 30000, NULL, XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
CDRETRIES, 30000, NULL, XS_CTL_DATA_IN);
if (error)
return (error);
s->bca.len = _2btol(&bf[0]);
@ -2385,7 +2373,7 @@ dvd_read_manufact(struct cd_softc *cd, dvd_struct *s)
_lto2b(4 + 2048, &cmd.bytes[7]);
error = scsipi_command(cd->sc_periph, &cmd, 12, bf, 4 + 2048,
CDRETRIES, 30000, NULL, XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
CDRETRIES, 30000, NULL, XS_CTL_DATA_IN);
if (error == 0) {
s->manufact.len = _2btol(&bf[0]);
if (s->manufact.len >= 0 && s->manufact.len <= 2048)
@ -2426,12 +2414,12 @@ cd_mode_sense(struct cd_softc *cd, u_int8_t byte2, void *sense, size_t size,
*big = 1;
return scsipi_mode_sense_big(cd->sc_periph, byte2, page, sense,
size + sizeof(struct scsi_mode_parameter_header_10),
flags | XS_CTL_DATA_ONSTACK, CDRETRIES, 20000);
flags, CDRETRIES, 20000);
} else {
*big = 0;
return scsipi_mode_sense(cd->sc_periph, byte2, page, sense,
size + sizeof(struct scsi_mode_parameter_header_6),
flags | XS_CTL_DATA_ONSTACK, CDRETRIES, 20000);
flags, CDRETRIES, 20000);
}
}
@ -2446,14 +2434,14 @@ cd_mode_select(struct cd_softc *cd, u_int8_t byte2, void *sense, size_t size,
_lto2b(0, header->data_length);
return scsipi_mode_select_big(cd->sc_periph, byte2, sense,
size + sizeof(struct scsi_mode_parameter_header_10),
flags | XS_CTL_DATA_ONSTACK, CDRETRIES, 20000);
flags, CDRETRIES, 20000);
} else {
struct scsi_mode_parameter_header_6 *header = sense;
header->data_length = 0;
return scsipi_mode_select(cd->sc_periph, byte2, sense,
size + sizeof(struct scsi_mode_parameter_header_6),
flags | XS_CTL_DATA_ONSTACK, CDRETRIES, 20000);
flags, CDRETRIES, 20000);
}
}
@ -2870,7 +2858,7 @@ mmc_getdiscinfo_cdrom(struct scsipi_periph *periph,
mmc_discinfo->link_block_penalty = 7; /* not relevant */
/* get number of sessions and first tracknr in last session */
flags = XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK;
flags = XS_CTL_DATA_IN;
memset(&gtoc_cmd, 0, sizeof(gtoc_cmd));
gtoc_cmd.opcode = READ_TOC;
gtoc_cmd.addr_mode = CD_MSF; /* not relevant */
@ -2892,7 +2880,7 @@ mmc_getdiscinfo_cdrom(struct scsipi_periph *periph,
mmc_discinfo->first_track_last_session = toc_msinfo->tracknr;
/* get last track of last session */
flags = XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK;
flags = XS_CTL_DATA_IN;
gtoc_cmd.resp_format = CD_TOC_FORM; /* formatted toc */
req_size = sizeof(*toc_hdr);
_lto2b(req_size, gtoc_cmd.data_len);
@ -2935,7 +2923,7 @@ mmc_getdiscinfo_dvdrom(struct scsipi_periph *periph,
mmc_discinfo->link_block_penalty = 16; /* not relevant */
/* get number of sessions and first tracknr in last session */
flags = XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK;
flags = XS_CTL_DATA_IN;
memset(&gtoc_cmd, 0, sizeof(gtoc_cmd));
gtoc_cmd.opcode = READ_TOC;
gtoc_cmd.addr_mode = 0; /* LBA */
@ -2992,7 +2980,7 @@ mmc_getdiscinfo(struct scsipi_periph *periph,
mmc_discinfo->link_block_penalty = 0;
/* determine mmc profile and class */
flags = XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK;
flags = XS_CTL_DATA_IN;
memset(&gc_cmd, 0, sizeof(gc_cmd));
gc_cmd.opcode = GET_CONFIGURATION;
_lto2b(GET_CONF_NO_FEATURES_LEN, gc_cmd.data_len);
@ -3021,7 +3009,7 @@ mmc_getdiscinfo(struct scsipi_periph *periph,
last_feature = feature = 0;
do {
/* determine mmc profile and class */
flags = XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK;
flags = XS_CTL_DATA_IN;
memset(&gc_cmd, 0, sizeof(gc_cmd));
gc_cmd.opcode = GET_CONFIGURATION;
_lto2b(last_feature, gc_cmd.start_at_feature);
@ -3098,7 +3086,7 @@ mmc_getdiscinfo(struct scsipi_periph *periph,
#endif
/* read in disc state and number of sessions and tracks */
flags = XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK | XS_CTL_SILENT;
flags = XS_CTL_DATA_IN | XS_CTL_SILENT;
memset(&di_cmd, 0, sizeof(di_cmd));
di_cmd.opcode = READ_DISCINFO;
di_cmd.data_len[1] = READ_DISCINFO_BIGSIZE;
@ -3197,7 +3185,7 @@ mmc_gettrackinfo_cdrom(struct scsipi_periph *periph,
*/
/* get raw toc to process, first header to check size */
flags = XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK | XS_CTL_SILENT;
flags = XS_CTL_DATA_IN | XS_CTL_SILENT;
memset(&gtoc_cmd, 0, sizeof(gtoc_cmd));
gtoc_cmd.opcode = READ_TOC;
gtoc_cmd.addr_mode = CD_MSF; /* not relevant */
@ -3378,7 +3366,7 @@ mmc_gettrackinfo_dvdrom(struct scsipi_periph *periph,
*/
/* get formatted toc to process, first header to check size */
flags = XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK | XS_CTL_SILENT;
flags = XS_CTL_DATA_IN | XS_CTL_SILENT;
memset(&gtoc_cmd, 0, sizeof(gtoc_cmd));
gtoc_cmd.opcode = READ_TOC;
gtoc_cmd.addr_mode = 0; /* lba's please */
@ -3493,7 +3481,7 @@ mmc_gettrackinfo(struct scsipi_periph *periph,
int mmc_profile;
/* set up SCSI call with track number from trackinfo.tracknr */
flags = XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK | XS_CTL_SILENT;
flags = XS_CTL_DATA_IN | XS_CTL_SILENT;
memset(&ti_cmd, 0, sizeof(ti_cmd));
ti_cmd.opcode = READ_TRACKINFO;
ti_cmd.addr_type = READ_TRACKINFO_ADDR_TRACK;
@ -3509,7 +3497,7 @@ mmc_gettrackinfo(struct scsipi_periph *periph,
if (error) {
/* trackinfo call failed, emulate for cd-rom/dvd-rom */
/* first determine mmc profile */
flags = XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK;
flags = XS_CTL_DATA_IN;
memset(&gc_cmd, 0, sizeof(gc_cmd));
gc_cmd.opcode = GET_CONFIGURATION;
_lto2b(GET_CONF_NO_FEATURES_LEN, gc_cmd.data_len);
@ -3589,7 +3577,7 @@ mmc_doclose(struct scsipi_periph *periph, int param, int func) {
int error, flags;
/* set up SCSI call with track number */
flags = XS_CTL_DATA_OUT | XS_CTL_DATA_ONSTACK;
flags = XS_CTL_DATA_OUT;
memset(&close_cmd, 0, sizeof(close_cmd));
close_cmd.opcode = CLOSE_TRACKSESSION;
close_cmd.function = func;
@ -3638,7 +3626,7 @@ mmc_do_close_or_finalise(struct scsipi_periph *periph, struct mmc_op *mmc_op)
memset(blob, 0, sizeof(blob));
page5 = blob+8;
flags = XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK;
flags = XS_CTL_DATA_IN;
error = scsipi_mode_sense_big(periph, SMS_PF, 5,
(void *)blob, sizeof(blob), flags, CDRETRIES, 20000);
if (error)
@ -3649,7 +3637,7 @@ mmc_do_close_or_finalise(struct scsipi_periph *periph, struct mmc_op *mmc_op)
if (close)
page5[3] |= 3 << 6;
flags = XS_CTL_DATA_OUT | XS_CTL_DATA_ONSTACK;
flags = XS_CTL_DATA_OUT;
error = scsipi_mode_select_big(periph, SMS_PF,
(void *)blob, sizeof(blob), flags, CDRETRIES, 20000);
if (error)
@ -3696,7 +3684,7 @@ mmc_do_reserve_track(struct scsipi_periph *periph, struct mmc_op *mmc_op)
/* TODO min/max support? */
/* set up SCSI call with requested space */
flags = XS_CTL_DATA_OUT | XS_CTL_DATA_ONSTACK;
flags = XS_CTL_DATA_OUT;
memset(&reserve_cmd, 0, sizeof(reserve_cmd));
reserve_cmd.opcode = RESERVE_TRACK;
_lto4b(extent, reserve_cmd.reservation_size);
@ -3751,7 +3739,7 @@ mmc_do_repair_track(struct scsipi_periph *periph, struct mmc_op *mmc_op)
/* TODO make mmc safeguards? */
/* set up SCSI call with track number */
flags = XS_CTL_DATA_OUT | XS_CTL_DATA_ONSTACK;
flags = XS_CTL_DATA_OUT;
memset(&repair_cmd, 0, sizeof(repair_cmd));
repair_cmd.opcode = REPAIR_TRACK;
_lto2b(mmc_op->tracknr, repair_cmd.tracknr);
@ -3824,7 +3812,7 @@ mmc_setup_writeparams(struct scsipi_periph *periph,
page5 = blob+8;
/* read mode page 5 (with header) */
flags = XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK;
flags = XS_CTL_DATA_IN;
error = scsipi_mode_sense_big(periph, SMS_PF, 5, (void *)blob,
sizeof(blob), flags, CDRETRIES, 20000);
if (error)
@ -3886,7 +3874,7 @@ mmc_setup_writeparams(struct scsipi_periph *periph,
}
/* write out updated mode page 5 (with header) */
flags = XS_CTL_DATA_OUT | XS_CTL_DATA_ONSTACK;
flags = XS_CTL_DATA_OUT;
error = scsipi_mode_select_big(periph, SMS_PF, (void *)blob,
sizeof(blob), flags, CDRETRIES, 20000);
if (error)

View File

@ -1,4 +1,4 @@
/* $NetBSD: ch.c,v 1.84 2009/05/12 14:44:31 cegger Exp $ */
/* $NetBSD: ch.c,v 1.85 2009/10/21 21:12:05 rmind Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ch.c,v 1.84 2009/05/12 14:44:31 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: ch.c,v 1.85 2009/10/21 21:12:05 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -734,8 +734,7 @@ ch_ousergetelemstatus(struct ch_softc *sc, int chet, u_int8_t *uptr)
* order to read all data.
*/
error = ch_getelemstatus(sc, sc->sc_firsts[chet],
sc->sc_counts[chet], &st_hdr, sizeof(st_hdr),
XS_CTL_DATA_ONSTACK, 0);
sc->sc_counts[chet], &st_hdr, sizeof(st_hdr), 0, 0);
if (error)
return (error);
@ -1107,7 +1106,7 @@ ch_setvoltag(struct ch_softc *sc, struct changer_set_voltag_request *csvr)
*/
return (scsipi_command(sc->sc_periph, (void *)&cmd, sizeof(cmd),
(void *)data, datalen, CHRETRIES, 100000, NULL,
datalen ? XS_CTL_DATA_OUT | XS_CTL_DATA_ONSTACK : 0));
datalen ? XS_CTL_DATA_OUT : 0));
}
static int
@ -1169,7 +1168,7 @@ ch_get_params(struct ch_softc *sc, int scsiflags)
memset(&sense_data, 0, sizeof(sense_data));
error = scsipi_mode_sense(sc->sc_periph, SMS_DBD, 0x1d,
&sense_data.header, sizeof(sense_data),
scsiflags | XS_CTL_DATA_ONSTACK, CHRETRIES, 6000);
scsiflags, CHRETRIES, 6000);
if (error) {
aprint_error_dev(&sc->sc_dev, "could not sense element address page\n");
return (error);
@ -1195,7 +1194,7 @@ ch_get_params(struct ch_softc *sc, int scsiflags)
*/
error = scsipi_mode_sense(sc->sc_periph, SMS_DBD, 0x1f,
&sense_data.header, sizeof(sense_data),
scsiflags | XS_CTL_DATA_ONSTACK, CHRETRIES, 6000);
scsiflags, CHRETRIES, 6000);
if (error) {
aprint_error_dev(&sc->sc_dev, "could not sense capabilities page\n");
return (error);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_se.c,v 1.78 2009/05/12 14:44:31 cegger Exp $ */
/* $NetBSD: if_se.c,v 1.79 2009/10/21 21:12:05 rmind Exp $ */
/*
* Copyright (c) 1997 Ian W. Dall <ian.dall@dsto.defence.gov.au>
@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_se.c,v 1.78 2009/05/12 14:44:31 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_se.c,v 1.79 2009/10/21 21:12:05 rmind Exp $");
#include "opt_inet.h"
#include "opt_atalk.h"
@ -735,7 +735,7 @@ se_add_proto(struct se_softc *sc, int proto)
error = se_scsipi_cmd(sc->sc_periph,
(void *)&add_proto_cmd, sizeof(add_proto_cmd),
data, sizeof(data), SERETRIES, SETIMEOUT, NULL,
XS_CTL_DATA_OUT | XS_CTL_DATA_ONSTACK);
XS_CTL_DATA_OUT);
return (error);
}
@ -750,7 +750,7 @@ se_get_addr(struct se_softc *sc, u_int8_t *myaddr)
error = se_scsipi_cmd(sc->sc_periph,
(void *)&get_addr_cmd, sizeof(get_addr_cmd),
myaddr, ETHER_ADDR_LEN, SERETRIES, SETIMEOUT, NULL,
XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK);
XS_CTL_DATA_IN);
printf("%s: ethernet address %s\n", device_xname(&sc->sc_dev),
ether_sprintf(myaddr));
return (error);

View File

@ -1,4 +1,4 @@
/* $NetBSD: scsiconf.c,v 1.253 2009/05/12 14:44:31 cegger Exp $ */
/* $NetBSD: scsiconf.c,v 1.254 2009/10/21 21:12:05 rmind Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.253 2009/05/12 14:44:31 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.254 2009/10/21 21:12:05 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -794,8 +794,7 @@ scsi_probe_device(struct scsibus_softc *sc, int target, int lun)
while (len < 3 + 28 + 20 + 1 + 1 + (8*2))
extension[len++] = ' ';
}
if (scsipi_inquire(periph, &inqbuf,
XS_CTL_DISCOVERY | XS_CTL_DATA_ONSTACK | XS_CTL_SILENT) != 0)
if (scsipi_inquire(periph, &inqbuf, XS_CTL_DISCOVERY | XS_CTL_SILENT))
goto bad;
periph->periph_type = inqbuf.device & SID_TYPE;

View File

@ -1,4 +1,4 @@
/* $NetBSD: scsipi_base.c,v 1.149 2009/04/07 18:10:45 dyoung Exp $ */
/* $NetBSD: scsipi_base.c,v 1.150 2009/10/21 21:12:05 rmind Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.149 2009/04/07 18:10:45 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.150 2009/10/21 21:12:05 rmind Exp $");
#include "opt_scsi.h"
@ -1868,19 +1868,6 @@ scsipi_execute_xs(struct scsipi_xfer *xs)
(chan->chan_bustype->bustype_cmd)(xs);
if (xs->xs_control & XS_CTL_DATA_ONSTACK) {
#if 1
if (xs->xs_control & XS_CTL_ASYNC)
panic("scsipi_execute_xs: on stack and async");
#endif
/*
* If the I/O buffer is allocated on stack, the
* process must NOT be swapped out, as the device will
* be accessing the stack.
*/
uvm_lwp_hold(curlwp);
}
xs->xs_status &= ~XS_STS_DONE;
xs->error = XS_NOERROR;
xs->resid = xs->datalen;
@ -2024,9 +2011,6 @@ scsipi_execute_xs(struct scsipi_xfer *xs)
* into....
*/
free_xs:
if (xs->xs_control & XS_CTL_DATA_ONSTACK)
uvm_lwp_rele(curlwp);
s = splbio();
scsipi_put_xs(xs);
splx(s);

View File

@ -1,4 +1,4 @@
/* $NetBSD: scsipiconf.h,v 1.115 2009/05/13 02:35:25 christos Exp $ */
/* $NetBSD: scsipiconf.h,v 1.116 2009/10/21 21:12:05 rmind Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2004 The NetBSD Foundation, Inc.
@ -570,7 +570,6 @@ struct scsipi_xfer {
#define XS_CTL_HEAD_TAG 0x00080000 /* use a Head of Queue Tag */
#define XS_CTL_THAW_PERIPH 0x00100000 /* thaw periph once enqueued */
#define XS_CTL_FREEZE_PERIPH 0x00200000 /* freeze periph when done */
#define XS_CTL_DATA_ONSTACK 0x00400000 /* data is alloc'ed on stack */
#define XS_CTL_REQSENSE 0x00800000 /* xfer is a request sense */
#define XS_CTL_TAGMASK (XS_CTL_SIMPLE_TAG|XS_CTL_ORDERED_TAG|XS_CTL_HEAD_TAG)

View File

@ -1,4 +1,4 @@
/* $NetBSD: sd.c,v 1.289 2009/08/03 09:40:45 jnemeth Exp $ */
/* $NetBSD: sd.c,v 1.290 2009/10/21 21:12:05 rmind Exp $ */
/*-
* Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.289 2009/08/03 09:40:45 jnemeth Exp $");
__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.290 2009/10/21 21:12:05 rmind Exp $");
#include "opt_scsi.h"
#include "rnd.h"
@ -1602,12 +1602,12 @@ sd_mode_sense(struct sd_softc *sd, u_int8_t byte2, void *sense, size_t size,
*big = 1;
return scsipi_mode_sense_big(sd->sc_periph, byte2, page, sense,
size + sizeof(struct scsi_mode_parameter_header_10),
flags | XS_CTL_DATA_ONSTACK, SDRETRIES, 6000);
flags, SDRETRIES, 6000);
} else {
*big = 0;
return scsipi_mode_sense(sd->sc_periph, byte2, page, sense,
size + sizeof(struct scsi_mode_parameter_header_6),
flags | XS_CTL_DATA_ONSTACK, SDRETRIES, 6000);
flags, SDRETRIES, 6000);
}
}
@ -1622,14 +1622,14 @@ sd_mode_select(struct sd_softc *sd, u_int8_t byte2, void *sense, size_t size,
_lto2b(0, header->data_length);
return scsipi_mode_select_big(sd->sc_periph, byte2, sense,
size + sizeof(struct scsi_mode_parameter_header_10),
flags | XS_CTL_DATA_ONSTACK, SDRETRIES, 6000);
flags, SDRETRIES, 6000);
} else {
struct scsi_mode_parameter_header_6 *header = sense;
header->data_length = 0;
return scsipi_mode_select(sd->sc_periph, byte2, sense,
size + sizeof(struct scsi_mode_parameter_header_6),
flags | XS_CTL_DATA_ONSTACK, SDRETRIES, 6000);
flags, SDRETRIES, 6000);
}
}
@ -1764,7 +1764,7 @@ sd_get_simplifiedparms(struct sd_softc *sd, struct disk_parms *dp, int flags)
error = scsipi_mode_sense(sd->sc_periph, SMS_DBD, 6,
&scsipi_sense.header, sizeof(scsipi_sense),
flags | XS_CTL_DATA_ONSTACK, SDRETRIES, 6000);
flags, SDRETRIES, 6000);
if (error != 0)
return (SDGP_RESULT_OFFLINE); /* XXX? */
@ -1824,7 +1824,7 @@ sd_get_capacity(struct sd_softc *sd, struct disk_parms *dp, int flags)
error = scsipi_command(sd->sc_periph,
(void *)&cmd, sizeof(cmd), (void *)&data, sizeof(data),
SDRETRIES, 20000, NULL,
flags | XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK);
flags | XS_CTL_DATA_IN);
if (error == EFTYPE) {
/* Medium Format Corrupted, handle as not formatted */
return (SDGP_RESULT_UNFORMATTED);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ss_mustek.c,v 1.38 2009/01/13 13:35:54 yamt Exp $ */
/* $NetBSD: ss_mustek.c,v 1.39 2009/10/21 21:12:06 rmind Exp $ */
/*
* Copyright (c) 1995 Joachim Koenig-Baltes. All rights reserved.
@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ss_mustek.c,v 1.38 2009/01/13 13:35:54 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: ss_mustek.c,v 1.39 2009/10/21 21:12:06 rmind Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -324,7 +324,7 @@ mustek_trigger_scanner(struct ss_softc *ss)
SC_DEBUG(periph, SCSIPI_DB1, ("mustek_set_parms: set_window\n"));
error = scsipi_command(periph, (void *)&window_cmd, sizeof(window_cmd),
(void *)&window_data, sizeof(window_data),
MUSTEK_RETRIES, 5000, NULL, XS_CTL_DATA_OUT | XS_CTL_DATA_ONSTACK);
MUSTEK_RETRIES, 5000, NULL, XS_CTL_DATA_OUT);
if (error)
return (error);
@ -363,7 +363,7 @@ mustek_trigger_scanner(struct ss_softc *ss)
/* send the command to the scanner */
error = scsipi_command(periph, (void *)&mode_cmd, sizeof(mode_cmd),
(void *)&mode_data, sizeof(mode_data),
MUSTEK_RETRIES, 5000, NULL, XS_CTL_DATA_OUT | XS_CTL_DATA_ONSTACK);
MUSTEK_RETRIES, 5000, NULL, XS_CTL_DATA_OUT);
if (error)
return (error);
@ -540,7 +540,7 @@ mustek_get_status(struct ss_softc *ss, int timeout, int update)
SC_DEBUG(periph, SCSIPI_DB1, ("mustek_get_status: stat_cmd\n"));
error = scsipi_command(periph, (void *)&cmd, sizeof(cmd),
(void *)&data, sizeof(data),
MUSTEK_RETRIES, 5000, NULL, XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK);
MUSTEK_RETRIES, 5000, NULL, XS_CTL_DATA_IN);
if (error)
return (error);
if ((data.ready_busy == MUSTEK_READY) ||

View File

@ -1,4 +1,4 @@
/* $NetBSD: ss_scanjet.c,v 1.49 2009/01/13 13:35:54 yamt Exp $ */
/* $NetBSD: ss_scanjet.c,v 1.50 2009/10/21 21:12:06 rmind Exp $ */
/*
* Copyright (c) 1995 Kenneth Stailey. All rights reserved.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ss_scanjet.c,v 1.49 2009/01/13 13:35:54 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: ss_scanjet.c,v 1.50 2009/10/21 21:12:06 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -332,7 +332,7 @@ scanjet_ctl_write(struct ss_softc *ss, char *tbuf, u_int size)
return (scsipi_command(ss->sc_periph,
(void *)&cmd, sizeof(cmd), (void *)tbuf, size, 0, 100000, NULL,
flags | XS_CTL_DATA_OUT | XS_CTL_DATA_ONSTACK));
flags | XS_CTL_DATA_OUT));
}
@ -355,7 +355,7 @@ scanjet_ctl_read(struct ss_softc *ss, char *tbuf, u_int size)
return (scsipi_command(ss->sc_periph,
(void *)&cmd, sizeof(cmd), (void *)tbuf, size, 0, 100000, NULL,
flags | XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK));
flags | XS_CTL_DATA_IN));
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: st.c,v 1.212 2009/08/15 12:44:55 pgoyette Exp $ */
/* $NetBSD: st.c,v 1.213 2009/10/21 21:12:06 rmind Exp $ */
/*-
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.212 2009/08/15 12:44:55 pgoyette Exp $");
__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.213 2009/10/21 21:12:06 rmind Exp $");
#include "opt_scsi.h"
@ -2007,7 +2007,7 @@ st_rdpos(struct st_softc *st, int hard, u_int32_t *blkptr)
error = scsipi_command(st->sc_periph, (void *)&cmd, sizeof(cmd),
(void *)&posdata, sizeof(posdata), ST_RETRIES, ST_CTL_TIME, NULL,
XS_CTL_SILENT | XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK);
XS_CTL_SILENT | XS_CTL_DATA_IN);
if (error == 0) {
#if 0
@ -2460,6 +2460,5 @@ st_mode_select(struct st_softc *st, int flags)
* do the command
*/
return scsipi_mode_select(periph, 0, &select.header, select_len,
flags | XS_CTL_DATA_ONSTACK, ST_RETRIES,
ST_CTL_TIME);
flags, ST_RETRIES, ST_CTL_TIME);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: st_atapi.c,v 1.24 2009/10/19 18:41:16 bouyer Exp $ */
/* $NetBSD: st_atapi.c,v 1.25 2009/10/21 21:12:06 rmind Exp $ */
/*
* Copyright (c) 2001 Manuel Bouyer.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: st_atapi.c,v 1.24 2009/10/19 18:41:16 bouyer Exp $");
__KERNEL_RCSID(0, "$NetBSD: st_atapi.c,v 1.25 2009/10/21 21:12:06 rmind Exp $");
#include "opt_scsi.h"
#include "rnd.h"
@ -85,7 +85,7 @@ st_atapibus_attach(device_t parent, device_t self, void *aux)
error = scsipi_mode_sense(periph, SMS_DBD,
ATAPI_TAPE_IDENTIFY_PAGE, &identify.header,
sizeof(identify), XS_CTL_DISCOVERY | XS_CTL_DATA_ONSTACK,
sizeof(identify), XS_CTL_DISCOVERY,
ST_RETRIES, ST_CTL_TIME);
if (error) {
printf("onstream get identify: error %d\n", error);
@ -94,8 +94,7 @@ st_atapibus_attach(device_t parent, device_t self, void *aux)
strncpy(identify.ident, "NBSD", 4);
error = scsipi_mode_select(periph, SMS_PF,
&identify.header, sizeof(identify),
XS_CTL_DISCOVERY | XS_CTL_DATA_ONSTACK,
ST_RETRIES, ST_CTL_TIME);
XS_CTL_DISCOVERY, ST_RETRIES, ST_CTL_TIME);
if (error) {
printf("onstream set identify: error %d\n", error);
return;
@ -137,7 +136,7 @@ st_atapibus_mode_sense(struct st_softc *st, int flags)
for (count = 0 ; count < 5 ; count++) {
error = scsipi_mode_sense(periph, SMS_DBD,
ATAPI_TAPE_CAP_PAGE, &cappage.header, sizeof(cappage),
flags | XS_CTL_DATA_ONSTACK, ST_RETRIES, ST_CTL_TIME);
flags, ST_RETRIES, ST_CTL_TIME);
if (error == 0) {
st->numblks = 0; /* unused anyway */
if (cappage.cap4 & ATAPI_TAPE_CAP_PAGE_BLK32K)

View File

@ -1,4 +1,4 @@
/* $NetBSD: st_scsi.c,v 1.30 2009/08/15 12:44:55 pgoyette Exp $ */
/* $NetBSD: st_scsi.c,v 1.31 2009/10/21 21:12:06 rmind Exp $ */
/*-
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: st_scsi.c,v 1.30 2009/08/15 12:44:55 pgoyette Exp $");
__KERNEL_RCSID(0, "$NetBSD: st_scsi.c,v 1.31 2009/10/21 21:12:06 rmind Exp $");
#include "opt_scsi.h"
#include "rnd.h"
@ -151,8 +151,7 @@ st_scsibus_read_block_limits(struct st_softc *st, int flags)
*/
error = scsipi_command(periph, (void *)&cmd, sizeof(cmd),
(void *)&block_limits, sizeof(block_limits),
ST_RETRIES, ST_CTL_TIME, NULL,
flags | XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK);
ST_RETRIES, ST_CTL_TIME, NULL, flags | XS_CTL_DATA_IN);
if (error)
return (error);
@ -197,7 +196,7 @@ st_scsibus_mode_sense(struct st_softc *st, int flags)
* it away.
*/
error = scsipi_mode_sense(st->sc_periph, 0, SMS_PCTRL_CURRENT,
&scsipi_sense.header, scsipi_sense_len, flags | XS_CTL_DATA_ONSTACK,
&scsipi_sense.header, scsipi_sense_len, flags,
ST_RETRIES, ST_CTL_TIME);
if (error)
return (error);
@ -252,8 +251,7 @@ st_scsibus_cmprss(struct st_softc *st, int flags, int onoff)
again:
memset(&scsi_pdata, 0, scsi_dlen);
error = scsipi_mode_sense(periph, byte2, page,
&scsi_pdata.header, scsi_dlen, flags | XS_CTL_DATA_ONSTACK,
ST_RETRIES, ST_CTL_TIME);
&scsi_pdata.header, scsi_dlen, flags, ST_RETRIES, ST_CTL_TIME);
if (error) {
if (byte2 != SMS_DBD) {
@ -332,7 +330,7 @@ again:
* Do the command
*/
error = scsipi_mode_select(periph, SMS_PF, &scsi_pdata.header,
scsi_dlen, flags | XS_CTL_DATA_ONSTACK, ST_RETRIES, ST_CTL_TIME);
scsi_dlen, flags, ST_RETRIES, ST_CTL_TIME);
if (error && (page & SMS_PAGE_MASK) == 0xf) {
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: umass_scsipi.c,v 1.34 2009/01/11 11:06:08 cegger Exp $ */
/* $NetBSD: umass_scsipi.c,v 1.35 2009/10/21 21:12:06 rmind Exp $ */
/*
* Copyright (c) 2001, 2003 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.34 2009/01/11 11:06:08 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.35 2009/10/21 21:12:06 rmind Exp $");
#include "atapibus.h"
#include "scsibus.h"
@ -526,8 +526,7 @@ umass_atapi_probe_device(struct atapibus_softc *atapi, int target)
DPRINTF(UDMASS_SCSI, ("umass_atapi_probe_device: doing inquiry\n"));
/* Now go ask the device all about itself. */
memset(&inqbuf, 0, sizeof(inqbuf));
if (scsipi_inquire(periph, &inqbuf,
XS_CTL_DISCOVERY | XS_CTL_DATA_ONSTACK) != 0) {
if (scsipi_inquire(periph, &inqbuf, XS_CTL_DISCOVERY) != 0) {
DPRINTF(UDMASS_SCSI, ("umass_atapi_probe_device: "
"scsipi_inquire failed\n"));
free(periph, M_DEVBUF);

View File

@ -1,4 +1,4 @@
/* $NetBSD: core_elf32.c,v 1.33 2008/11/19 18:36:06 ad Exp $ */
/* $NetBSD: core_elf32.c,v 1.34 2009/10/21 21:12:06 rmind Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.33 2008/11/19 18:36:06 ad Exp $");
__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.34 2009/10/21 21:12:06 rmind Exp $");
#ifdef _KERNEL_OPT
#include "opt_coredump.h"
@ -432,9 +432,7 @@ ELFNAMEEND(coredump_note)(struct proc *p, struct lwp *l, void *iocookie,
notesize = sizeof(nhdr) + elfround(namesize) + elfround(sizeof(intreg));
if (iocookie) {
uvm_lwp_hold(l);
error = elf_process_read_regs(l, &intreg);
uvm_lwp_rele(l);
if (error)
return (error);
@ -453,9 +451,7 @@ ELFNAMEEND(coredump_note)(struct proc *p, struct lwp *l, void *iocookie,
#ifdef PT_GETFPREGS
notesize = sizeof(nhdr) + elfround(namesize) + elfround(sizeof(freg));
if (iocookie) {
uvm_lwp_hold(l);
error = elf_process_read_fpregs(l, &freg);
uvm_lwp_rele(l);
if (error)
return (error);

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_sysctl.c,v 1.167 2009/09/16 15:03:56 pooka Exp $ */
/* $NetBSD: init_sysctl.c,v 1.168 2009/10/21 21:12:06 rmind Exp $ */
/*-
* Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.167 2009/09/16 15:03:56 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.168 2009/10/21 21:12:06 rmind Exp $");
#include "opt_sysv.h"
#include "opt_compat_netbsd32.h"
@ -136,7 +136,6 @@ static const u_int sysctl_stflagmap[] = {
};
static const u_int sysctl_lwpflagmap[] = {
LW_INMEM, P_INMEM,
LW_SINTR, P_SINTR,
LW_SYSTEM, P_SYSTEM,
LW_SA, P_SA, /* WRS ??? */
@ -2954,7 +2953,6 @@ fill_kproc2(struct proc *p, struct kinfo_proc2 *ki, bool zombie)
ki->p_schedflags = l->l_cpu->ci_schedstate.spc_flags;
else
ki->p_schedflags = 0;
ki->p_holdcnt = l->l_holdcnt;
ki->p_priority = lwp_eprio(l);
ki->p_usrpri = l->l_priority;
if (l->l_wchan)
@ -3061,7 +3059,6 @@ fill_lwp(struct lwp *l, struct kinfo_lwp *kl)
kl->l_schedflags = l->l_cpu->ci_schedstate.spc_flags;
else
kl->l_schedflags = 0;
kl->l_holdcnt = l->l_holdcnt;
kl->l_priority = lwp_eprio(l);
kl->l_usrpri = l->l_priority;
if (l->l_wchan)

Some files were not shown because too many files have changed in this diff Show More