diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2006-04-27 15:21:20 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2006-04-27 15:21:20 +0000 |
commit | d0e2b02b7fd2aff1385a5d51e4ab38560cc619be (patch) | |
tree | 389560ba7fbd43e775c1300ed064f37695401624 /sys/uvm | |
parent | c6da5747e39816c0b25624e90bd243ff68288b4b (diff) |
from PAE work:
as freepages being vconverted back to byte address make sure to
perform calculations in (upcoming) larger paddr_t to avoid losing
higher bits in calculation.
Diffstat (limited to 'sys/uvm')
-rw-r--r-- | sys/uvm/uvm_page.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c index 1562afe2347..95150357607 100644 --- a/sys/uvm/uvm_page.c +++ b/sys/uvm/uvm_page.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_page.c,v 1.51 2006/01/16 13:11:05 mickey Exp $ */ +/* $OpenBSD: uvm_page.c,v 1.52 2006/04/27 15:21:19 mickey Exp $ */ /* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */ /* @@ -293,7 +293,7 @@ uvm_page_init(kvm_startp, kvm_endp) * pages). */ - pagecount = ((freepages + 1) << PAGE_SHIFT) / + pagecount = (((paddr_t)freepages + 1) << PAGE_SHIFT) / (PAGE_SIZE + sizeof(struct vm_page)); pagearray = (vm_page_t)uvm_pageboot_alloc(pagecount * sizeof(struct vm_page)); |