summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2001-08-17 22:29:22 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2001-08-17 22:29:22 +0000
commit84491d083600c55dde337afe1bd3525beb8fa4b1 (patch)
tree7fdc966282a9fb413c10a654b153168115e468ca /sys/arch/powerpc
parentf32d7c484e583c99f060009edb140c1254989583 (diff)
When rounding up to the next page size, add NBPG-1, not NBPG before
trunc_page.
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r--sys/arch/powerpc/powerpc/machdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/powerpc/powerpc/machdep.c b/sys/arch/powerpc/powerpc/machdep.c
index cc837733129..40fbd7e754b 100644
--- a/sys/arch/powerpc/powerpc/machdep.c
+++ b/sys/arch/powerpc/powerpc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.73 2001/07/25 13:25:33 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.74 2001/08/17 22:29:21 drahn Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -1195,7 +1195,7 @@ bus_mem_add_mapping(bpa, size, cacheable, bshp)
bus_size_t alloc_size;
/* need to steal vm space before kernel vm is initialized */
- alloc_size = trunc_page(size + NBPG);
+ alloc_size = trunc_page(size + NBPG-1);
ppc_kvm_size -= alloc_size;
vaddr = VM_MIN_KERNEL_ADDRESS + ppc_kvm_size;