summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1997-04-02 22:02:56 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1997-04-02 22:02:56 +0000
commitd36742d2208baf9523b7c3356e52a86f2a189cc4 (patch)
tree3f515292a1d6385c08291dbecf5ff6d4e06371bf
parent4a5b421c8c43f0091d9549ca21a030fb99c3bc06 (diff)
Fix end boundary of mapping for regions ending at offset 1 in a page.
From NetBSD PR#3441, Matthias Drochner <drochner@zelz26.zel.kfa-juelich.de>
-rw-r--r--sys/arch/i386/i386/machdep.c6
1 files 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)