diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-02-16 22:59:35 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-02-16 22:59:35 +0000 |
commit | 1a10ddac6334cd1d72c83ebbe928bc299c814462 (patch) | |
tree | 1aeeda6f4751185cc1eda52398909de341854528 /sys | |
parent | 0b1522d28ccee7e33b06d62c4f2d2ea48982c468 (diff) |
Only create phys_map on systems which need it, and test for phys_map being
non-null instead of for a variety of vax_boardtype values in vmapbuf() and
vunmapbuf().
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/vax/vax/machdep.c | 13 | ||||
-rw-r--r-- | sys/arch/vax/vax/vm_machdep.c | 12 |
2 files changed, 13 insertions, 12 deletions
diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c index 45202e4ea40..b76940a2a67 100644 --- a/sys/arch/vax/vax/machdep.c +++ b/sys/arch/vax/vax/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.93 2007/12/28 20:41:56 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.94 2008/02/16 22:59:34 miod Exp $ */ /* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */ /* @@ -227,12 +227,19 @@ cpu_startup() exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, 16 * NCARGS, VM_MAP_PAGEABLE, FALSE, NULL); +#if VAX46 || VAX48 || VAX49 || VAX53 /* * Allocate a submap for physio. This map effectively limits the * number of processes doing physio at any one time. + * + * Note that machines on which all mass storage I/O controllers + * can perform address translation, do not need this. */ - phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, - VM_PHYS_SIZE, 0, FALSE, NULL); + if (vax_boardtype == VAX_BTYP_46 || vax_boardtype == VAX_BTYP_48 || + vax_boardtype == VAX_BTYP_49 || vax_boardtype == VAX_BTYP_1303) + phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, + VM_PHYS_SIZE, 0, FALSE, NULL); +#endif printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free), ptoa(uvmexp.free)/1024/1024); diff --git a/sys/arch/vax/vax/vm_machdep.c b/sys/arch/vax/vax/vm_machdep.c index c913238c64d..2a2daf1a21d 100644 --- a/sys/arch/vax/vax/vm_machdep.c +++ b/sys/arch/vax/vax/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.36 2007/10/13 07:18:02 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.37 2008/02/16 22:59:34 miod Exp $ */ /* $NetBSD: vm_machdep.c,v 1.67 2000/06/29 07:14:34 mrg Exp $ */ /* @@ -271,10 +271,7 @@ vmapbuf(bp, len) paddr_t pa; struct proc *p; - if (vax_boardtype != VAX_BTYP_46 - && vax_boardtype != VAX_BTYP_48 - && vax_boardtype != VAX_BTYP_49 - && vax_boardtype != VAX_BTYP_1303) + if (phys_map == NULL) return; if ((bp->b_flags & B_PHYS) == 0) panic("vmapbuf"); @@ -309,10 +306,7 @@ vunmapbuf(bp, len) #if VAX46 || VAX48 || VAX49 || VAX53 vaddr_t addr, off; - if (vax_boardtype != VAX_BTYP_46 - && vax_boardtype != VAX_BTYP_48 - && vax_boardtype != VAX_BTYP_49 - && vax_boardtype != VAX_BTYP_1303) + if (phys_map == NULL) return; if ((bp->b_flags & B_PHYS) == 0) panic("vunmapbuf"); |