summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-01-23 17:51:53 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-01-23 17:51:53 +0000
commitd6f3a5a5848c3b8733d6044cabdb1943c5f909ec (patch)
treef43fe5ae80851518b5d33edd28282d0f89a6f3c1 /sys
parente5c274a5bf9e959bd0d99c68ebd8e3a60c577ec0 (diff)
move mb_map allocation to mbinit()
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/alpha/machdep.c5
-rw-r--r--sys/arch/amiga/amiga/machdep.c5
-rw-r--r--sys/arch/hp300/hp300/machdep.c5
-rw-r--r--sys/arch/hppa/hppa/machdep.c5
-rw-r--r--sys/arch/i386/i386/machdep.c5
-rw-r--r--sys/arch/mac68k/mac68k/machdep.c5
-rw-r--r--sys/arch/macppc/macppc/machdep.c5
-rw-r--r--sys/arch/mvme68k/mvme68k/machdep.c4
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c5
-rw-r--r--sys/arch/mvmeppc/mvmeppc/machdep.c6
-rw-r--r--sys/arch/sparc/sparc/machdep.c4
-rw-r--r--sys/arch/sparc64/sparc64/machdep.c8
-rw-r--r--sys/arch/sun3/sun3/machdep.c5
-rw-r--r--sys/arch/vax/vax/machdep.c5
-rw-r--r--sys/kern/uipc_mbuf.c7
15 files changed, 20 insertions, 59 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c
index 0f5086a5db1..ed29ed9df75 100644
--- a/sys/arch/alpha/alpha/machdep.c
+++ b/sys/arch/alpha/alpha/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.64 2002/01/23 17:35:55 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.65 2002/01/23 17:51:52 art Exp $ */
/* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */
/*-
@@ -955,9 +955,6 @@ cpu_startup()
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, FALSE, NULL);
- mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
-
#if defined(DEBUG)
pmapdebug = opmapdebug;
#endif
diff --git a/sys/arch/amiga/amiga/machdep.c b/sys/arch/amiga/amiga/machdep.c
index 69432ff1601..bb04b68e755 100644
--- a/sys/arch/amiga/amiga/machdep.c
+++ b/sys/arch/amiga/amiga/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.64 2002/01/23 17:35:56 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.65 2002/01/23 17:51:52 art Exp $ */
/* $NetBSD: machdep.c,v 1.95 1997/08/27 18:31:17 is Exp $ */
/*
@@ -473,9 +473,6 @@ again:
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, FALSE, NULL);
- mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
-
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index dc71544d8d0..59743ab2705 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.76 2002/01/23 17:35:56 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.77 2002/01/23 17:51:52 art Exp $ */
/* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */
/*
@@ -348,9 +348,6 @@ cpu_startup()
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, FALSE, NULL);
- mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
-
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index 71d77a1467e..c6d4500525f 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.49 2002/01/23 17:35:56 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.50 2002/01/23 17:51:52 art Exp $ */
/*
* Copyright (c) 1999-2000 Michael Shalayeff
@@ -651,9 +651,6 @@ cpu_startup()
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, FALSE, NULL);
- mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
-
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index dd7ba8cf78a..1735eaa320f 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.193 2002/01/23 17:35:56 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.194 2002/01/23 17:51:52 art Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -395,9 +395,6 @@ cpu_startup()
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, FALSE, NULL);
- mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
-
printf("avail mem = %lu (%uK)\n", ptoa(uvmexp.free),
ptoa(uvmexp.free)/1024);
printf("using %d buffers containing %u bytes (%uK) of memory\n",
diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c
index 90cfc0a426c..17501d81479 100644
--- a/sys/arch/mac68k/mac68k/machdep.c
+++ b/sys/arch/mac68k/mac68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.93 2002/01/23 17:35:56 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.94 2002/01/23 17:51:52 art Exp $ */
/* $NetBSD: machdep.c,v 1.207 1998/07/08 04:39:34 thorpej Exp $ */
/*
@@ -494,9 +494,6 @@ again:
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, FALSE, NULL);
- mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
-
printf("avail mem = %ld\n", ptoa(uvmexp.free));
printf("using %d buffers containing %d bytes of memory\n",
nbuf, bufpages * PAGE_SIZE);
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index ebf59d50937..d3fd5bf8291 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.23 2002/01/23 17:35:56 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.24 2002/01/23 17:51:52 art Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -596,9 +596,6 @@ cpu_startup()
VM_PHYS_SIZE, 0, FALSE, NULL);
ppc_malloc_ok = 1;
- mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
-
printf("avail mem = %d (%dK)\n", ptoa(uvmexp.free),
ptoa(uvmexp.free)/1024);
printf("using %d buffers containing %d bytes of memory\n", nbuf,
diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c
index 38a755148e6..75812cb0b4b 100644
--- a/sys/arch/mvme68k/mvme68k/machdep.c
+++ b/sys/arch/mvme68k/mvme68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.63 2002/01/23 17:35:56 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.64 2002/01/23 17:51:52 art Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -394,8 +394,6 @@ again:
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, FALSE, NULL);
- mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index d97b2c469b9..302cbb04d29 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.87 2002/01/23 17:35:56 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.88 2002/01/23 17:51:52 art Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -654,9 +654,6 @@ cpu_startup()
if (iomap_extent == NULL)
panic("unable to allocate extent for iomap");
- mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
-
printf("avail mem = %ld (%ld pages)\n", ptoa(uvmexp.free), uvmexp.free);
printf("using %d buffers containing %d bytes of memory\n", nbuf,
bufpages * PAGE_SIZE);
diff --git a/sys/arch/mvmeppc/mvmeppc/machdep.c b/sys/arch/mvmeppc/mvmeppc/machdep.c
index e4cacdc9d4a..4a016f9b9b8 100644
--- a/sys/arch/mvmeppc/mvmeppc/machdep.c
+++ b/sys/arch/mvmeppc/mvmeppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.19 2002/01/23 17:35:56 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.20 2002/01/23 17:51:52 art Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -565,10 +565,6 @@ cpu_startup()
VM_PHYS_SIZE, 0, FALSE, NULL);
ppc_malloc_ok = 1;
-
- mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
-
printf("avail mem = %d\n", ptoa(uvmexp.free));
printf("using %d buffers containing %d bytes of memory\n", nbuf,
bufpages * PAGE_SIZE);
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index 6c35268fc45..177e5d5f7b3 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.77 2002/01/23 17:35:56 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.78 2002/01/23 17:51:52 art Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
@@ -272,8 +272,6 @@ cpu_startup()
if (dvmamap_extent == 0)
panic("unable to allocate extent for dvma");
- mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c
index dd32703be89..8410f635ebf 100644
--- a/sys/arch/sparc64/sparc64/machdep.c
+++ b/sys/arch/sparc64/sparc64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.30 2002/01/23 17:35:56 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.31 2002/01/23 17:51:52 art Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
@@ -314,12 +314,6 @@ cpu_startup()
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
- /*
- * Finally, allocate mbuf cluster submap.
- */
- mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
-
#ifdef DEBUG
pmapdebug = opmapdebug;
#endif
diff --git a/sys/arch/sun3/sun3/machdep.c b/sys/arch/sun3/sun3/machdep.c
index 4772ad13372..09f075f3515 100644
--- a/sys/arch/sun3/sun3/machdep.c
+++ b/sys/arch/sun3/sun3/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.49 2002/01/23 17:35:56 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.50 2002/01/23 17:51:52 art Exp $ */
/* $NetBSD: machdep.c,v 1.77 1996/10/13 03:47:51 christos Exp $ */
/*
@@ -331,9 +331,6 @@ cpu_startup()
* device drivers clone the kernel mappings into DVMA space.
*/
- mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
-
printf("avail mem = %ld\n", ptoa(uvmexp.free));
printf("using %d buffers containing %d bytes of memory\n",
nbuf, bufpages * PAGE_SIZE);
diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c
index 887f6d0a68d..bac6402564c 100644
--- a/sys/arch/vax/vax/machdep.c
+++ b/sys/arch/vax/vax/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.51 2002/01/23 17:35:56 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.52 2002/01/23 17:51:52 art Exp $ */
/* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */
/*
@@ -273,9 +273,6 @@ cpu_startup()
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, FALSE, NULL);
- mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
- VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
-
printf("avail memory = %ld\n", ptoa(uvmexp.free));
printf("using %d buffers containing %d bytes of memory\n", nbuf, bufpages * PAGE_SIZE);
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index f2fedbfe6ce..68af410a5a5 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf.c,v 1.47 2002/01/23 17:35:57 art Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.48 2002/01/23 17:51:52 art Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
@@ -115,6 +115,11 @@ struct pool_allocator mclpool_allocator = {
void
mbinit()
{
+ vaddr_t minaddr, maxaddr;
+
+ mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
+ VM_MBUF_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
+
pool_init(&mbpool, MSIZE, 0, 0, 0, "mbpl", NULL);
pool_init(&mclpool, MCLBYTES, 0, 0, 0, "mclpl", &mclpool_allocator);