diff options
author | 2001-08-17 22:29:21 +0000 | |
---|---|---|
committer | 2001-08-17 22:29:21 +0000 | |
commit | ab10db61265d38e5b30effe5964625794d90bcbd (patch) | |
tree | 3a0a4ac5fa8284c3e42c296cccfad6ee8e6ffc1d | |
parent | 'y' and 'Y' both mean yes. (diff) | |
download | wireguard-openbsd-ab10db61265d38e5b30effe5964625794d90bcbd.tar.xz wireguard-openbsd-ab10db61265d38e5b30effe5964625794d90bcbd.zip |
When rounding up to the next page size, add NBPG-1, not NBPG before
trunc_page.
-rw-r--r-- | sys/arch/powerpc/powerpc/machdep.c | 4 |
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; |