summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_device.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-11-06 01:35:05 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-11-06 01:35:05 +0000
commitc40da229a2b8863dc5e8391bcf995784e71c9ca3 (patch)
tree43acd53cc5611454b5f62fd69b7f5cc806d36ca6 /sys/uvm/uvm_device.c
parentdb54c5228ebca1e9fcf986c2c042c4475999f208 (diff)
Move the last content from vm/ to uvm/
The only thing left in vm/ are just dumb wrappers. vm/vm.h includes uvm/uvm_extern.h vm/pmap.h includes uvm/uvm_pmap.h vm/vm_page.h includes uvm/uvm_page.h
Diffstat (limited to 'sys/uvm/uvm_device.c')
-rw-r--r--sys/uvm/uvm_device.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/uvm/uvm_device.c b/sys/uvm/uvm_device.c
index 0c93389c59d..a2542a7de68 100644
--- a/sys/uvm/uvm_device.c
+++ b/sys/uvm/uvm_device.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_device.c,v 1.15 2001/11/05 22:14:54 art Exp $ */
-/* $NetBSD: uvm_device.c,v 1.26 2000/06/26 14:21:17 mrg Exp $ */
+/* $OpenBSD: uvm_device.c,v 1.16 2001/11/06 01:35:04 art Exp $ */
+/* $NetBSD: uvm_device.c,v 1.28 2000/06/27 17:29:20 mrg Exp $ */
/*
*
@@ -46,8 +46,6 @@
#include <sys/malloc.h>
#include <sys/vnode.h>
-#include <vm/vm.h>
-
#include <uvm/uvm.h>
#include <uvm/uvm_device.h>
@@ -406,7 +404,7 @@ udv_fault(ufi, vaddr, pps, npages, centeridx, fault_type, access_type, flags)
struct uvm_object *uobj = entry->object.uvm_obj;
struct uvm_device *udv = (struct uvm_device *)uobj;
vaddr_t curr_va;
- int curr_offset;
+ off_t curr_offset;
paddr_t paddr, mdpgno;
int lcv, retval;
dev_t device;
@@ -447,7 +445,7 @@ udv_fault(ufi, vaddr, pps, npages, centeridx, fault_type, access_type, flags)
* addresses in a submap must match the main map, this is ok.
*/
/* udv offset = (offset from start of entry) + entry's offset */
- curr_offset = (int)((vaddr - entry->start) + entry->offset);
+ curr_offset = entry->offset + (vaddr - entry->start);
/* pmap va = vaddr (virtual address of pps[0]) */
curr_va = vaddr;
@@ -472,8 +470,8 @@ udv_fault(ufi, vaddr, pps, npages, centeridx, fault_type, access_type, flags)
paddr = pmap_phys_address(mdpgno);
mapprot = ufi->entry->protection;
UVMHIST_LOG(maphist,
- " MAPPING: device: pm=0x%x, va=0x%x, pa=0x%x, at=%d",
- ufi->orig_map->pmap, curr_va, (int)paddr, mapprot);
+ " 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) {
/*