Change the vm_map's "entries_pageable" member to a r/o flags member, which

has PAGEABLE and INTRSAFE flags.  PAGEABLE now really means "pageable",
not "allocate vm_map_entry's from non-static pool", so update all map
creations to reflect that.  INTRSAFE maps are maps that are used in
interrupt context (e.g. kmem_map, mb_map), and thus use the static
map entry pool (XXX as does kernel_map, for now).  This will eventually
change now these maps are locked, as well.
This commit is contained in:
thorpej 1999-05-26 19:16:28 +00:00
parent 2ac88c9554
commit 2580d306ab
38 changed files with 156 additions and 138 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.174 1999/05/21 00:09:09 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.175 1999/05/26 19:16:28 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@ -80,7 +80,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.174 1999/05/21 00:09:09 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.175 1999/05/26 19:16:28 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1000,13 +1000,13 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16 * NCARGS, TRUE, FALSE, NULL);
16 * NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
/*
* No need to allocate an mbuf cluster submap. Mbuf clusters

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.136 1999/05/20 08:21:43 lukem Exp $ */
/* $NetBSD: machdep.c,v 1.137 1999/05/26 19:16:29 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -331,19 +331,20 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, TRUE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
/*
* Finally, allocate mbuf cluster submap.
*/
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
nmbclusters * mclbytes, FALSE, FALSE, NULL);
nmbclusters * mclbytes, VM_MAP_INTRSAFE,
FALSE, NULL);
/*
* Initialize callouts

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.64 1999/04/22 04:24:52 chs Exp $ */
/* $NetBSD: pmap.c,v 1.65 1999/05/26 19:16:29 thorpej Exp $ */
/*
* Copyright (c) 1991 Regents of the University of California.
@ -606,8 +606,8 @@ pmap_init()
* Allocate the segment table map and the page table map.
*/
s = maxproc * AMIGA_STSIZE;
st_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, TRUE,
FALSE, &st_map_store);
st_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, 0, FALSE,
&st_map_store);
addr = amiga_uptbase;
if ((AMIGA_UPTMAXSIZE / AMIGA_UPTSIZE) < maxproc) {
@ -621,7 +621,7 @@ pmap_init()
maxproc = (AMIGA_UPTMAXSIZE / AMIGA_UPTSIZE);
} else
s = (maxproc * AMIGA_UPTSIZE);
pt_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, TRUE,
pt_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, VM_MAP_PAGEABLE,
TRUE, &pt_map_store);
#if defined(M68040) || defined(M68060)

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.68 1999/05/20 08:21:43 lukem Exp $ */
/* $NetBSD: machdep.c,v 1.69 1999/05/26 19:16:29 thorpej Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@ -439,19 +439,20 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, TRUE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
/*
* Finally, allocate mbuf cluster submap.
*/
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
nmbclusters * mclbytes, FALSE, FALSE, NULL);
nmbclusters * mclbytes, VM_MAP_INTRSAFE,
FALSE, NULL);
/*
* Initialise callouts

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.83 1999/05/26 14:29:34 leo Exp $ */
/* $NetBSD: machdep.c,v 1.84 1999/05/26 19:16:30 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -252,19 +252,20 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, TRUE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
/*
* Finally, allocate mbuf cluster submap.
*/
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
nmbclusters * mclbytes, FALSE, FALSE, NULL);
nmbclusters * mclbytes, VM_MAP_INTRSAFE,
FALSE, NULL);
/*
* Tell the VM system that page 0 isn't mapped.

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.44 1999/04/22 04:24:52 chs Exp $ */
/* $NetBSD: pmap.c,v 1.45 1999/05/26 19:16:30 thorpej Exp $ */
/*
* Copyright (c) 1991 Regents of the University of California.
@ -579,7 +579,7 @@ pmap_init()
}
else s = maxproc * ATARI_UPTSIZE;
pt_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, TRUE,
pt_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, VM_MAP_PAGEABLE,
TRUE, &pt_map_store);
#ifdef DEBUG

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.37 1999/05/20 08:21:43 lukem Exp $ */
/* $NetBSD: machdep.c,v 1.38 1999/05/26 19:16:30 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -530,13 +530,13 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, TRUE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
/*
* No need to allocate an mbuf cluster submap. Mbuf clusters

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.126 1999/05/20 08:21:44 lukem Exp $ */
/* $NetBSD: machdep.c,v 1.127 1999/05/26 19:16:30 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -340,19 +340,20 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, TRUE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
/*
* Finally, allocate mbuf cluster submap.
*/
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
nmbclusters * mclbytes, FALSE, FALSE, NULL);
nmbclusters * mclbytes, VM_MAP_INTRSAFE,
FALSE, NULL);
/*
* Initialize callouts

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.73 1999/04/22 04:24:53 chs Exp $ */
/* $NetBSD: pmap.c,v 1.74 1999/05/26 19:16:30 thorpej Exp $ */
/*
* Copyright (c) 1991, 1993
@ -481,8 +481,8 @@ pmap_init()
* Allocate the segment table map and the page table map.
*/
s = maxproc * HP_STSIZE;
st_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, TRUE,
FALSE, &st_map_store);
st_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, 0, FALSE,
&st_map_store);
addr = HP_PTBASE;
if ((HP_PTMAXSIZE / HP_MAX_PTSIZE) < maxproc) {
@ -496,7 +496,7 @@ pmap_init()
maxproc = (HP_PTMAXSIZE / HP_MAX_PTSIZE);
} else
s = (maxproc * HP_MAX_PTSIZE);
pt_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, TRUE,
pt_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, VM_MAP_PAGEABLE,
TRUE, &pt_map_store);
#if defined(M68040)

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.357 1999/05/25 23:30:27 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.358 1999/05/26 19:16:31 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -441,19 +441,19 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, TRUE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
/*
* Finally, allocate mbuf cluster submap.
*/
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
nmbclusters * mclbytes, FALSE, FALSE, NULL);
nmbclusters * mclbytes, VM_MAP_INTRSAFE, FALSE, NULL);
/*
* Initialize callouts

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.234 1999/05/24 18:40:48 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.235 1999/05/26 19:16:31 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -429,19 +429,19 @@ cpu_startup(void)
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16 * NCARGS, TRUE, FALSE, NULL);
16 * NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
/*
* Finally, allocate mbuf cluster submap.
*/
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
nmbclusters * mclbytes, FALSE, FALSE, NULL);
nmbclusters * mclbytes, VM_MAP_INTRSAFE, FALSE, NULL);
/*
* Initialize callouts

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.56 1999/05/02 17:23:07 scottr Exp $ */
/* $NetBSD: pmap.c,v 1.57 1999/05/26 19:16:32 thorpej Exp $ */
/*
* Copyright (c) 1991, 1993
@ -474,7 +474,7 @@ pmap_init()
* Allocate the segment table map and the page table map.
*/
s = maxproc * MAC_STSIZE;
st_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, TRUE,
st_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, 0,
FALSE, &st_map_store);
addr = MAC_PTBASE;
@ -489,7 +489,7 @@ pmap_init()
maxproc = (MAC_PTMAXSIZE / MAC_MAX_PTSIZE);
} else
s = (maxproc * MAC_MAX_PTSIZE);
pt_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, TRUE,
pt_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, VM_MAP_PAGEABLE,
TRUE, &pt_map_store);
#if defined(M68040)

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.46 1999/05/20 08:21:45 lukem Exp $ */
/* $NetBSD: machdep.c,v 1.47 1999/05/26 19:16:32 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -536,13 +536,13 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, TRUE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
/*
* No need to allocate an mbuf cluster submap. Mbuf clusters

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.56 1999/05/20 08:21:45 lukem Exp $ */
/* $NetBSD: machdep.c,v 1.57 1999/05/26 19:16:32 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -444,18 +444,19 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, TRUE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
/*
* Finally, allocate mbuf cluster submap.
*/
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
nmbclusters * mclbytes, FALSE, FALSE, NULL);
nmbclusters * mclbytes, VM_MAP_INTRSAFE,
FALSE, NULL);
/*
* Initialize callouts

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.32 1999/04/22 04:24:53 chs Exp $ */
/* $NetBSD: pmap.c,v 1.33 1999/05/26 19:16:32 thorpej Exp $ */
/*
* Copyright (c) 1991, 1993
@ -460,7 +460,7 @@ pmap_init()
* Allocate the segment table map and the page table map.
*/
s = maxproc * HP_STSIZE;
st_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, TRUE,
st_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, 0,
FALSE, &st_map_store);
addr = HP_PTBASE;
@ -475,7 +475,7 @@ pmap_init()
maxproc = (HP_PTMAXSIZE / HP_MAX_PTSIZE);
} else
s = (maxproc * HP_MAX_PTSIZE);
pt_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, TRUE,
pt_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, VM_MAP_PAGEABLE,
TRUE, &pt_map_store);
#if defined(M68040)

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.27 1999/05/20 08:21:45 lukem Exp $ */
/* $NetBSD: machdep.c,v 1.28 1999/05/26 19:16:33 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,7 +43,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.27 1999/05/20 08:21:45 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.28 1999/05/26 19:16:33 thorpej Exp $");
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
@ -400,12 +400,12 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16 * NCARGS, TRUE, FALSE, NULL);
16 * NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
/*
* No need to allocate an mbuf cluster submap. Mbuf clusters

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.23 1999/05/20 08:21:45 lukem Exp $ */
/* $NetBSD: machdep.c,v 1.24 1999/05/26 19:16:33 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -384,18 +384,19 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, TRUE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
/*
* Finally, allocate mbuf cluster submap.
*/
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
nmbclusters * mclbytes, FALSE, FALSE, NULL);
nmbclusters * mclbytes, VM_MAP_INTRSAFE,
FALSE, NULL);
/*
* Initialize callouts

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.13 1999/04/22 04:24:54 chs Exp $ */
/* $NetBSD: pmap.c,v 1.14 1999/05/26 19:16:33 thorpej Exp $ */
/*
* This file was taken from mvme68k/mvme68k/pmap.c
@ -519,7 +519,7 @@ bogons:
* Allocate the segment table map and the page table map
*/
s = maxproc * HP_STSIZE;
st_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, TRUE,
st_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, 0,
FALSE, &st_map_store);
addr = HP_PTBASE;
@ -534,7 +534,7 @@ bogons:
maxproc = (HP_PTMAXSIZE / HP_MAX_PTSIZE);
} else
s = (maxproc * HP_MAX_PTSIZE);
pt_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, TRUE,
pt_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, VM_MAP_PAGEABLE,
TRUE, &pt_map_store);
#if defined(M68040)

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.40 1999/05/20 08:21:46 lukem Exp $ */
/* $NetBSD: machdep.c,v 1.41 1999/05/26 19:16:33 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -452,13 +452,13 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, TRUE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
/*
* No need to allocate an mbuf cluster submap. Mbuf clusters

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.101 1999/05/25 23:31:14 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.102 1999/05/26 19:16:33 thorpej Exp $ */
/*-
* Copyright (c) 1996 Matthias Pfaller.
@ -282,19 +282,19 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, TRUE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
/*
* Finally, allocate mbuf cluster submap.
*/
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
nmbclusters * mclbytes, FALSE, FALSE, NULL);
nmbclusters * mclbytes, VM_MAP_INTRSAFE, FALSE, NULL);
/*
* Tell the VM system that writing to kernel text isn't allowed.

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.145 1999/05/26 04:27:27 nisimura Exp $ */
/* $NetBSD: machdep.c,v 1.146 1999/05/26 19:16:34 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,7 +43,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.145 1999/05/26 04:27:27 nisimura Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.146 1999/05/26 19:16:34 thorpej Exp $");
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
@ -539,13 +539,13 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16 * NCARGS, TRUE, FALSE, NULL);
16 * NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
/*
* No need to allocate an mbuf cluster submap. Mbuf clusters

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.150 1999/05/25 23:14:07 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.151 1999/05/26 19:16:34 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -265,7 +265,7 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, TRUE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
if (CPU_ISSUN4OR4C) {
/*
@ -283,7 +283,7 @@ cpu_startup()
* Finally, allocate mbuf cluster submap.
*/
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
nmbclusters * mclbytes, FALSE, FALSE, NULL);
nmbclusters * mclbytes, VM_MAP_INTRSAFE, FALSE, NULL);
/*
* Initialize callouts

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.41 1999/05/25 23:14:08 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.42 1999/05/26 19:16:34 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -281,7 +281,7 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, TRUE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a map for physio. Others use a submap of the kernel
@ -290,7 +290,7 @@ cpu_startup()
*/
dvma_base = DVMA_BASE;
dvma_end = DVMA_END;
phys_map = uvm_map_create(pmap_kernel(), dvma_base, dvma_end, 1);
phys_map = uvm_map_create(pmap_kernel(), dvma_base, dvma_end, 0);
if (phys_map == NULL)
panic("unable to create DVMA map");
/*
@ -307,7 +307,7 @@ cpu_startup()
* Finally, allocate mbuf cluster submap.
*/
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
nmbclusters * mclbytes, FALSE, FALSE, NULL);
nmbclusters * mclbytes, VM_MAP_INTRSAFE, FALSE, NULL);
/*
* Initialize callouts
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: dvma.c,v 1.15 1999/03/24 05:51:14 mrg Exp $ */
/* $NetBSD: dvma.c,v 1.16 1999/05/26 19:16:34 thorpej Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -87,7 +87,7 @@ dvma_init()
* remainder will be used as the DVMA page pool.
*/
phys_map = uvm_map_create(pmap_kernel(),
DVMA_MAP_BASE, DVMA_MAP_END, 1);
DVMA_MAP_BASE, DVMA_MAP_END, 0);
if (phys_map == NULL)
panic("unable to create DVMA map");

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.130 1999/05/20 08:21:47 lukem Exp $ */
/* $NetBSD: machdep.c,v 1.131 1999/05/26 19:16:35 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Gordon W. Ross
@ -278,7 +278,7 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, TRUE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* We don't use a submap for physio, and use a separate map
@ -291,7 +291,8 @@ cpu_startup()
* Finally, allocate mbuf cluster submap.
*/
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
nmbclusters * mclbytes, FALSE, FALSE, NULL);
nmbclusters * mclbytes, VM_MAP_INTRSAFE,
FALSE, NULL);
/*
* Initialize callouts

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.50 1999/05/20 08:21:47 lukem Exp $ */
/* $NetBSD: machdep.c,v 1.51 1999/05/26 19:16:35 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -273,7 +273,7 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, TRUE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* We don't use a submap for physio, and use a separate map
@ -286,7 +286,8 @@ cpu_startup()
* Finally, allocate mbuf cluster submap.
*/
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
nmbclusters * mclbytes, FALSE, FALSE, NULL);
nmbclusters * mclbytes, VM_MAP_INTRSAFE,
FALSE, NULL);
/*
* Initialize callouts

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.83 1999/05/20 08:21:47 lukem Exp $ */
/* $NetBSD: machdep.c,v 1.84 1999/05/26 19:16:35 thorpej Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
@ -242,14 +242,14 @@ cpu_startup()
* the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16 * NCARGS, TRUE, FALSE, NULL);
16 * NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
#if VAX410 || VAX43
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
#endif
/*
* Initialize callouts

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.64 1999/05/23 23:03:44 ragge Exp $ */
/* $NetBSD: pmap.c,v 1.65 1999/05/26 19:16:35 thorpej Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -290,7 +290,7 @@ pmap_init()
{
/* reserve place on SPT for UPT */
pte_map = uvm_km_suballoc(kernel_map, &ptemapstart, &ptemapend,
USRPTSIZE * 4 * maxproc, TRUE, FALSE, &pte_map_store);
USRPTSIZE * 4 * maxproc, 0, FALSE, &pte_map_store);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.69 1999/05/20 08:21:48 lukem Exp $ */
/* $NetBSD: machdep.c,v 1.70 1999/05/26 19:16:35 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -328,19 +328,20 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, TRUE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, TRUE, FALSE, NULL);
VM_PHYS_SIZE, 0, FALSE, NULL);
/*
* Finally, allocate mbuf cluster submap.
*/
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
nmbclusters * mclbytes, FALSE, FALSE, NULL);
nmbclusters * mclbytes, VM_MAP_INTRSAFE,
FALSE, NULL);
/*
* Initialize callouts

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.34 1999/05/21 15:32:38 minoura Exp $ */
/* $NetBSD: pmap.c,v 1.35 1999/05/26 19:16:36 thorpej Exp $ */
/*
* Copyright (c) 1991, 1993
@ -486,8 +486,8 @@ pmap_init()
* Allocate the segment table map and the page table map.
*/
s = maxproc * X68K_STSIZE;
st_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, TRUE,
FALSE, &st_map_store);
st_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, 0, FALSE,
&st_map_store);
addr = X68K_PTBASE;
if ((X68K_PTMAXSIZE / X68K_MAX_PTSIZE) < maxproc) {
@ -501,7 +501,7 @@ pmap_init()
maxproc = (X68K_PTMAXSIZE / X68K_MAX_PTSIZE);
} else
s = (maxproc * X68K_MAX_PTSIZE);
pt_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, TRUE,
pt_map = uvm_km_suballoc(kernel_map, &addr, &addr2, s, VM_MAP_PAGEABLE,
TRUE, &pt_map_store);
#if defined(M68040) || defined(M68060)

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_malloc.c,v 1.41 1999/03/24 05:51:23 mrg Exp $ */
/* $NetBSD: kern_malloc.c,v 1.42 1999/05/26 19:16:36 thorpej Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@ -627,7 +627,7 @@ kmeminit()
(vsize_t)(npg * sizeof(struct kmemusage)));
kmem_map = uvm_km_suballoc(kernel_map, (vaddr_t *)&kmembase,
(vaddr_t *)&kmemlimit, (vsize_t)(npg * NBPG),
FALSE, FALSE, &kmem_map_store);
VM_MAP_INTRSAFE, FALSE, &kmem_map_store);
#ifdef KMEMSTATS
for (indx = 0; indx < MINBUCKET + 16; indx++) {
if (1 << indx >= CLBYTES)

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_extern.h,v 1.26 1999/05/26 01:05:24 thorpej Exp $ */
/* $NetBSD: uvm_extern.h,v 1.27 1999/05/26 19:16:36 thorpej Exp $ */
/*
*
@ -302,7 +302,7 @@ void uvm_km_free_wakeup __P((vm_map_t, vaddr_t,
vaddr_t uvm_km_kmemalloc __P((vm_map_t, struct uvm_object *,
vsize_t, int));
struct vm_map *uvm_km_suballoc __P((vm_map_t, vaddr_t *,
vaddr_t *, vsize_t, boolean_t,
vaddr_t *, vsize_t, int,
boolean_t, vm_map_t));
vaddr_t uvm_km_valloc __P((vm_map_t, vsize_t));
vaddr_t uvm_km_valloc_wait __P((vm_map_t, vsize_t));

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_km.c,v 1.24 1999/05/25 20:30:08 thorpej Exp $ */
/* $NetBSD: uvm_km.c,v 1.25 1999/05/26 19:16:36 thorpej Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@ -456,7 +456,7 @@ uvm_km_init(start, end)
* before installing.
*/
uvm_map_setup(&kernel_map_store, base, end, FALSE);
uvm_map_setup(&kernel_map_store, base, end, VM_MAP_PAGEABLE);
kernel_map_store.pmap = pmap_kernel();
if (uvm_map(&kernel_map_store, &base, start - base, NULL,
UVM_UNKNOWN_OFFSET, UVM_MAPFLAG(UVM_PROT_ALL, UVM_PROT_ALL,
@ -481,11 +481,11 @@ uvm_km_init(start, end)
* alloc a new map
*/
struct vm_map *
uvm_km_suballoc(map, min, max, size, pageable, fixed, submap)
uvm_km_suballoc(map, min, max, size, flags, fixed, submap)
struct vm_map *map;
vaddr_t *min, *max; /* OUT, OUT */
vsize_t size;
boolean_t pageable;
int flags;
boolean_t fixed;
struct vm_map *submap;
{
@ -515,11 +515,11 @@ uvm_km_suballoc(map, min, max, size, pageable, fixed, submap)
pmap_reference(vm_map_pmap(map));
if (submap == NULL) {
submap = uvm_map_create(vm_map_pmap(map), *min, *max, pageable);
submap = uvm_map_create(vm_map_pmap(map), *min, *max, flags);
if (submap == NULL)
panic("uvm_km_suballoc: unable to create submap");
} else {
uvm_map_setup(submap, *min, *max, pageable);
uvm_map_setup(submap, *min, *max, flags);
submap->pmap = vm_map_pmap(map);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_map.c,v 1.44 1999/05/26 00:36:53 thorpej Exp $ */
/* $NetBSD: uvm_map.c,v 1.45 1999/05/26 19:16:36 thorpej Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@ -206,11 +206,11 @@ uvm_mapent_alloc(map)
UVMHIST_FUNC("uvm_mapent_alloc");
UVMHIST_CALLED(maphist);
if (map->entries_pageable) {
if ((map->flags & VM_MAP_INTRSAFE) == 0 &&
map != kernel_map && kernel_map != NULL /* XXX */) {
me = pool_get(&uvm_map_entry_pool, PR_WAITOK);
me->flags = 0;
/* me can't be null, wait ok */
} else {
s = splimp(); /* protect kentry_free list with splimp */
simple_lock(&uvm.kentry_lock);
@ -219,14 +219,14 @@ uvm_mapent_alloc(map)
simple_unlock(&uvm.kentry_lock);
splx(s);
if (!me)
panic("mapent_alloc: out of kernel map entries, check MAX_KMAPENT");
panic("mapent_alloc: out of static map entries, check MAX_KMAPENT");
me->flags = UVM_MAP_STATIC;
}
UVMHIST_LOG(maphist, "<- new entry=0x%x [pageable=%d]",
me, map->entries_pageable, 0, 0);
UVMHIST_LOG(maphist, "<- new entry=0x%x [kentry=%d]",
me, ((map->flags & VM_MAP_INTRSAFE) != 0 || map == kernel_map)
? TRUE : FALSE, 0, 0);
return(me);
}
/*
@ -1979,6 +1979,11 @@ uvm_map_pageable(map, start, end, new_pageable)
UVMHIST_LOG(maphist,"(map=0x%x,start=0x%x,end=0x%x,new_pageable=0x%x)",
map, start, end, new_pageable);
#ifdef DIAGNOSTIC
if ((map->flags & VM_MAP_PAGEABLE) == 0)
panic("uvm_map_pageable: map %p not pageable", map);
#endif
vm_map_lock(map);
VM_MAP_RANGE_CHECK(map, start, end);
@ -2377,7 +2382,7 @@ uvmspace_init(vm, pmap, min, max, pageable)
memset(vm, 0, sizeof(*vm));
uvm_map_setup(&vm->vm_map, min, max, pageable);
uvm_map_setup(&vm->vm_map, min, max, pageable ? VM_MAP_PAGEABLE : 0);
if (pmap)
pmap_reference(pmap);
@ -2488,7 +2493,7 @@ uvmspace_exec(p)
* for p
*/
nvm = uvmspace_alloc(map->min_offset, map->max_offset,
map->entries_pageable);
(map->flags & VM_MAP_PAGEABLE) ? TRUE : FALSE);
#if (defined(i386) || defined(pc532)) && !defined(PMAP_NEW)
/*
@ -2594,7 +2599,7 @@ uvmspace_fork(vm1)
vm_map_lock(old_map);
vm2 = uvmspace_alloc(old_map->min_offset, old_map->max_offset,
old_map->entries_pageable);
(old_map->flags & VM_MAP_PAGEABLE) ? TRUE : FALSE);
memcpy(&vm2->vm_startcopy, &vm1->vm_startcopy,
(caddr_t) (vm1 + 1) - (caddr_t) &vm1->vm_startcopy);
new_map = &vm2->vm_map; /* XXX */

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_map.h,v 1.13 1999/05/23 06:27:13 mrg Exp $ */
/* $NetBSD: uvm_map.h,v 1.14 1999/05/26 19:16:36 thorpej Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@ -138,7 +138,7 @@ void uvm_map_clip_end __P((vm_map_t, vm_map_entry_t,
vaddr_t));
MAP_INLINE
vm_map_t uvm_map_create __P((pmap_t, vaddr_t,
vaddr_t, boolean_t));
vaddr_t, int));
int uvm_map_extract __P((vm_map_t, vaddr_t, vsize_t,
vm_map_t, vaddr_t *, int));
vm_map_entry_t uvm_map_findspace __P((vm_map_t, vaddr_t, vsize_t,
@ -157,7 +157,7 @@ int uvm_map_replace __P((vm_map_t, vaddr_t, vaddr_t,
int uvm_map_reserve __P((vm_map_t, vsize_t, vaddr_t,
vaddr_t *));
void uvm_map_setup __P((vm_map_t, vaddr_t,
vaddr_t, boolean_t));
vaddr_t, int));
int uvm_map_submap __P((vm_map_t, vaddr_t,
vaddr_t, vm_map_t));
MAP_INLINE

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_map_i.h,v 1.12 1999/05/03 08:53:24 mrg Exp $ */
/* $NetBSD: uvm_map_i.h,v 1.13 1999/05/26 19:16:36 thorpej Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@ -86,15 +86,15 @@
*/
MAP_INLINE vm_map_t
uvm_map_create(pmap, min, max, pageable)
uvm_map_create(pmap, min, max, flags)
pmap_t pmap;
vaddr_t min, max;
boolean_t pageable;
int flags;
{
vm_map_t result;
MALLOC(result, vm_map_t, sizeof(struct vm_map), M_VMMAP, M_WAITOK);
uvm_map_setup(result, min, max, pageable);
uvm_map_setup(result, min, max, flags);
result->pmap = pmap;
return(result);
}
@ -106,10 +106,10 @@ uvm_map_create(pmap, min, max, pageable)
*/
MAP_INLINE void
uvm_map_setup(map, min, max, pageable)
uvm_map_setup(map, min, max, flags)
vm_map_t map;
vaddr_t min, max;
boolean_t pageable;
int flags;
{
map->header.next = map->header.prev = &map->header;
@ -118,7 +118,7 @@ uvm_map_setup(map, min, max, pageable)
map->ref_count = 1;
map->min_offset = min;
map->max_offset = max;
map->entries_pageable = pageable;
map->flags = flags;
map->first_free = &map->header;
map->hint = &map->header;
map->timestamp = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_pager.c,v 1.19 1999/05/26 06:42:57 thorpej Exp $ */
/* $NetBSD: uvm_pager.c,v 1.20 1999/05/26 19:16:36 thorpej Exp $ */
/*
*
@ -91,7 +91,7 @@ uvm_pager_init()
*/
pager_map = uvm_km_suballoc(kernel_map, &uvm.pager_sva, &uvm.pager_eva,
PAGER_MAP_SIZE, FALSE, FALSE, NULL);
PAGER_MAP_SIZE, 0, FALSE, NULL);
simple_lock_init(&pager_map_wanted_lock);
pager_map_wanted = FALSE;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_map.h,v 1.24 1999/04/10 13:52:11 drochner Exp $ */
/* $NetBSD: vm_map.h,v 1.25 1999/05/26 19:16:37 thorpej Exp $ */
/*
* Copyright (c) 1991, 1993
@ -140,12 +140,16 @@ struct vm_map {
vm_map_entry_t hint; /* hint for quick lookups */
simple_lock_data_t hint_lock; /* lock for hint storage */
vm_map_entry_t first_free; /* First free space hint */
boolean_t entries_pageable; /* map entries pageable?? */
int flags; /* flags (read-only) */
unsigned int timestamp; /* Version number */
#define min_offset header.start
#define max_offset header.end
};
/* vm_map flags */
#define VM_MAP_PAGEABLE 0x01 /* entries are pageable */
#define VM_MAP_INTRSAFE 0x02 /* interrupt safe map */
/*
* Macros: vm_map_lock, etc.
* Function: