From 6bb943809348df9c2843e864ffd66747f0ffc1b2 Mon Sep 17 00:00:00 2001 From: niklas Date: Wed, 2 Apr 1997 22:02:55 +0000 Subject: [PATCH] Fix end boundary of mapping for regions ending at offset 1 in a page. From NetBSD PR#3441, Matthias Drochner --- sys/arch/i386/i386/machdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 8522f4004f8..31fe0448c5a 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.42 1997/02/24 04:05:48 downsj Exp $ */ +/* $OpenBSD: machdep.c,v 1.43 1997/04/02 22:02:55 niklas Exp $ */ /* $NetBSD: machdep.c,v 1.202 1996/05/18 15:54:59 christos Exp $ */ /*- @@ -1681,7 +1681,7 @@ bus_mem_add_mapping(bpa, size, cacheable, bshp) vm_offset_t va; pa = i386_trunc_page(bpa); - endpa = i386_round_page((bpa + size) - 1); + endpa = i386_round_page(bpa + size); #ifdef DIAGNOSTIC if (endpa <= pa) @@ -1728,7 +1728,7 @@ bus_space_unmap(t, bsh, size) case I386_BUS_SPACE_MEM: ex = iomem_ex; va = i386_trunc_page(bsh); - endva = i386_round_page((bsh + size) - 1); + endva = i386_round_page(bsh + size); #ifdef DIAGNOSTIC if (endva <= va) -- 2.20.1