From 4abf2e6985cf86def02bd15183c00c86b176cfe5 Mon Sep 17 00:00:00 2001 From: Brandon Creighton Date: Wed, 18 Oct 2000 21:37:36 +0000 Subject: round off size passed to vax_mem_bus_space_map -- anything which mapped >1 page (like asc*) wouldn't work from netbsd --- sys/arch/vax/vax/bus_mem.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/arch') 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; } -- cgit v1.2.3