diff options
author | David Greenman <dg@FreeBSD.org> | 1994-09-27 20:45:24 +0000 |
---|---|---|
committer | David Greenman <dg@FreeBSD.org> | 1994-09-27 20:45:24 +0000 |
commit | 5992708aea450d1d99db653700a0276b76152d2f (patch) | |
tree | f63d392b7b56993f3898769e159b5bd06ab23ce2 /sys | |
parent | c3c6d51ea0655869e5fdcdeb4ffead5a9a5d8a57 (diff) | |
download | src-5992708aea450d1d99db653700a0276b76152d2f.tar.gz src-5992708aea450d1d99db653700a0276b76152d2f.zip |
Notes
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vm_page.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 1a2ab555a7ff..189bff8df203 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91 - * $Id: vm_page.c,v 1.6 1994/09/27 18:00:27 davidg Exp $ + * $Id: vm_page.c,v 1.7 1994/09/27 19:34:16 davidg Exp $ */ /* @@ -605,7 +605,7 @@ again: * Find first page in array that is free, within range, and aligned. */ for (i = start; i < cnt.v_page_count; i++) { - phys = pga[i].phys_addr; + phys = VM_PAGE_TO_PHYS(&pga[i]); if (((pga[i].flags & PG_FREE) == PG_FREE) && (phys >= low) && (phys < high) && ((phys & (alignment - 1)) == 0)) @@ -615,7 +615,7 @@ again: /* * If the above failed or we will exceed the upper bound, fail. */ - if ((i == cnt.v_page_count) || ((pga[i].phys_addr + size) > high)) { + if ((i == cnt.v_page_count) || ((VM_PAGE_TO_PHYS(&pga[i]) + size) > high)) { splx(s); return (NULL); } @@ -626,8 +626,8 @@ again: * Check successive pages for contiguous and free. */ for (i = start + 1; i < (start + size / PAGE_SIZE); i++) { - if ((pga[i].phys_addr != - (pga[i - 1].phys_addr + PAGE_SIZE)) || + if ((VM_PAGE_TO_PHYS(&pga[i]) != + (VM_PAGE_TO_PHYS(&pga[i - 1]) + PAGE_SIZE)) || ((pga[i].flags & PG_FREE) != PG_FREE)) { start++; goto again; @@ -646,7 +646,7 @@ again: cnt.v_free_count--; vm_page_wire(&pga[i]); pga[i].flags = PG_CLEAN; /* shut off PG_FREE and any other flags */ - pmap_kenter(tmp_addr, pga[start].phys_addr); + pmap_kenter(tmp_addr, VM_PAGE_TO_PHYS(&pga[i])); tmp_addr += PAGE_SIZE; } |