summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBrandon Creighton <bjc@cvs.openbsd.org>2000-10-18 21:37:36 +0000
committerBrandon Creighton <bjc@cvs.openbsd.org>2000-10-18 21:37:36 +0000
commit4abf2e6985cf86def02bd15183c00c86b176cfe5 (patch)
treefdfef3505dc690cbfb2c3b8e6d0ec6bad293c517 /sys
parenta7ba8b8b7510d26f43067c75c88a392651e3b1b4 (diff)
round off size passed to vax_mem_bus_space_map --
anything which mapped >1 page (like asc*) wouldn't work from netbsd
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/vax/vax/bus_mem.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/vax/vax/bus_mem.c b/sys/arch/vax/vax/bus_mem.c
index 3374b600ab7..4f51408a5c0 100644
--- a/sys/arch/vax/vax/bus_mem.c
+++ b/sys/arch/vax/vax/bus_mem.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: bus_mem.c,v 1.1 2000/04/27 01:10:10 bjc Exp $ */
-/* $NetBSD: bus_mem.c,v 1.5 1999/05/24 20:10:30 ragge Exp $ */
+/* $OpenBSD: bus_mem.c,v 1.2 2000/10/18 21:37:35 bjc Exp $ */
+/* $NetBSD: bus_mem.c,v 1.8 2000/06/29 07:14:23 mrg Exp $ */
/*
* Copyright (c) 1998 Matt Thomas
* All rights reserved.
@@ -58,13 +58,14 @@ vax_mem_bus_space_map(
{
vaddr_t va;
+ size += (pa & VAX_PGOFSET); /* have to include the byte offset */
va = uvm_km_valloc(kernel_map, size);
if (va == 0)
return (ENOMEM);
*bshp = (bus_space_handle_t)(va + (pa & VAX_PGOFSET));
- ioaccess(va, pa, size >> VAX_PGSHIFT);
+ ioaccess(va, pa, (size + VAX_NBPG - 1) >> VAX_PGSHIFT);
return 0;
}