summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2008-02-16 22:59:34 +0000
committermiod <miod@openbsd.org>2008-02-16 22:59:34 +0000
commit8b40b39463d13cff025c6235b3f58f1ba16a050f (patch)
tree17dbdc1f751f49b4e26e67c399f00df5a9d2bd95
parentCount output packets. (diff)
downloadwireguard-openbsd-8b40b39463d13cff025c6235b3f58f1ba16a050f.tar.xz
wireguard-openbsd-8b40b39463d13cff025c6235b3f58f1ba16a050f.zip
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().
-rw-r--r--sys/arch/vax/vax/machdep.c13
-rw-r--r--sys/arch/vax/vax/vm_machdep.c12
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");