diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-11-28 13:47:41 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-11-28 13:47:41 +0000 |
commit | 4c46afe9f467831fba921bfa77a12903c4c39c7d (patch) | |
tree | b755c95bf93b8cb384f911d3f70b96063188d78a /sys/uvm/uvm_device.c | |
parent | 8a3355695ffa23bba7a2cb69d229a81ba3485bf9 (diff) |
Sync in more uvm changes from NetBSD.
This time we're getting rid of KERN_* and VM_PAGER_* error codes and
use errnos instead.
Diffstat (limited to 'sys/uvm/uvm_device.c')
-rw-r--r-- | sys/uvm/uvm_device.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/uvm/uvm_device.c b/sys/uvm/uvm_device.c index 932fdfd5ec3..2704d728c7d 100644 --- a/sys/uvm/uvm_device.c +++ b/sys/uvm/uvm_device.c @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_device.c,v 1.17 2001/11/07 02:55:50 art Exp $ */ -/* $NetBSD: uvm_device.c,v 1.30 2000/11/25 06:27:59 chs Exp $ */ +/* $OpenBSD: uvm_device.c,v 1.18 2001/11/28 13:47:39 art Exp $ */ +/* $NetBSD: uvm_device.c,v 1.32 2001/03/15 06:10:56 chs Exp $ */ /* * @@ -401,7 +401,7 @@ udv_fault(ufi, vaddr, pps, npages, centeridx, fault_type, access_type, flags) UVMHIST_LOG(maphist, "<- failed -- COW entry (etype=0x%x)", entry->etype, 0,0,0); uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap, uobj, NULL); - return(VM_PAGER_ERROR); + return(EIO); } /* @@ -427,7 +427,7 @@ udv_fault(ufi, vaddr, pps, npages, centeridx, fault_type, access_type, flags) * loop over the page range entering in as needed */ - retval = VM_PAGER_OK; + retval = 0; for (lcv = 0 ; lcv < npages ; lcv++, curr_offset += PAGE_SIZE, curr_va += PAGE_SIZE) { if ((flags & PGO_ALLPAGES) == 0 && lcv != centeridx) @@ -438,7 +438,7 @@ udv_fault(ufi, vaddr, pps, npages, centeridx, fault_type, access_type, flags) mdpgno = (*mapfn)(device, curr_offset, access_type); if (mdpgno == -1) { - retval = VM_PAGER_ERROR; + retval = EIO; break; } paddr = pmap_phys_address(mdpgno); @@ -447,7 +447,7 @@ udv_fault(ufi, vaddr, pps, npages, centeridx, fault_type, access_type, flags) " MAPPING: device: pm=0x%x, va=0x%x, pa=0x%lx, at=%d", ufi->orig_map->pmap, curr_va, paddr, mapprot); if (pmap_enter(ufi->orig_map->pmap, curr_va, paddr, - mapprot, PMAP_CANFAIL | mapprot) != KERN_SUCCESS) { + mapprot, PMAP_CANFAIL | mapprot) != 0) { /* * pmap_enter() didn't have the resource to * enter this mapping. Unlock everything, @@ -461,7 +461,7 @@ udv_fault(ufi, vaddr, pps, npages, centeridx, fault_type, access_type, flags) uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap, uobj, NULL); uvm_wait("udv_fault"); - return (VM_PAGER_REFAULT); + return (ERESTART); } } |