diff options
| -rw-r--r-- | sys/ia64/ia64/pmap.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index d5f4bbd7dc2e..84e1ef2d760d 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -553,6 +553,7 @@ pmap_swapout_proc(p) #if 0 int i; vm_object_t upobj; + vm_offset_t up; vm_page_t m; /* @@ -561,15 +562,14 @@ pmap_swapout_proc(p) ia64_fpstate_save(p, 1); upobj = p->p_upages_obj; - /* - * let the upages be paged - */ - for(i=0;i<UPAGES;i++) { - if ((m = vm_page_lookup(upobj, i)) == NULL) - panic("pmap_swapout_proc: upage already missing???"); + up = (vm_offset_t)p->p_addr; + for (i = 0; i < UPAGES; i++) { + m = vm_page_lookup(upobj, i); + if (m == NULL) + panic("pmap_swapout_proc: upage already missing?"); vm_page_dirty(m); vm_page_unwire(m, 0); - pmap_kremove((vm_offset_t)p->p_addr + PAGE_SIZE * i); + pmap_kremove(up + i * PAGE_SIZE); } #endif } @@ -582,18 +582,16 @@ pmap_swapin_proc(p) struct proc *p; { #if 0 - int i,rv; + int i, rv; vm_object_t upobj; + vm_offset_t up; vm_page_t m; upobj = p->p_upages_obj; - for(i=0;i<UPAGES;i++) { - + up = (vm_offset_t)p->p_addr; + for (i = 0; i < UPAGES; i++) { m = vm_page_grab(upobj, i, VM_ALLOC_NORMAL | VM_ALLOC_RETRY); - - pmap_kenter(((vm_offset_t) p->p_addr) + i * PAGE_SIZE, - VM_PAGE_TO_PHYS(m)); - + pmap_kenter(up + i * PAGE_SIZE, VM_PAGE_TO_PHYS(m)); if (m->valid != VM_PAGE_BITS_ALL) { rv = vm_pager_get_pages(upobj, &m, 1, 0); if (rv != VM_PAGER_OK) @@ -601,7 +599,6 @@ pmap_swapin_proc(p) m = vm_page_lookup(upobj, i); m->valid = VM_PAGE_BITS_ALL; } - vm_page_wire(m); vm_page_wakeup(m); vm_page_flag_set(m, PG_MAPPED | PG_WRITEABLE); |
