summaryrefslogtreecommitdiff
path: root/sys/uvm
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-12-26 15:41:01 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-12-26 15:41:01 +0000
commit55d0ea063b25d8b25fea5135f59de22437ecd4ea (patch)
tree42c739678ad68f903e06cc29eb0db1df3bf6298e /sys/uvm
parent47f20d782a94ebc11fb4c7b43294559377be4989 (diff)
Kill pmap_phys_address(), and force every driver's mmap() routine to return
a physical address [more precisely, something suitable to pass to pmap_enter()'sphysical address argument]. This allows MI drivers to implement mmap() routines without having to know about the pmap_phys_address() implementation and #ifdef obfuscation.
Diffstat (limited to 'sys/uvm')
-rw-r--r--sys/uvm/uvm_device.c9
-rw-r--r--sys/uvm/uvm_pmap.h5
2 files changed, 5 insertions, 9 deletions
diff --git a/sys/uvm/uvm_device.c b/sys/uvm/uvm_device.c
index e48e4dc60c6..6dc97150008 100644
--- a/sys/uvm/uvm_device.c
+++ b/sys/uvm/uvm_device.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_device.c,v 1.38 2010/04/30 21:56:39 oga Exp $ */
+/* $OpenBSD: uvm_device.c,v 1.39 2010/12/26 15:41:00 miod Exp $ */
/* $NetBSD: uvm_device.c,v 1.30 2000/11/25 06:27:59 chs Exp $ */
/*
@@ -358,7 +358,7 @@ udv_fault(struct uvm_faultinfo *ufi, vaddr_t vaddr, vm_page_t *pps, int npages,
struct uvm_device *udv = (struct uvm_device *)uobj;
vaddr_t curr_va;
off_t curr_offset;
- paddr_t paddr, mdpgno;
+ paddr_t paddr;
int lcv, retval;
dev_t device;
paddr_t (*mapfn)(dev_t, off_t, int);
@@ -410,12 +410,11 @@ udv_fault(struct uvm_faultinfo *ufi, vaddr_t vaddr, vm_page_t *pps, int npages,
if (pps[lcv] == PGO_DONTCARE)
continue;
- mdpgno = (*mapfn)(device, curr_offset, access_type);
- if (mdpgno == -1) {
+ paddr = (*mapfn)(device, curr_offset, access_type);
+ if (paddr == -1) {
retval = VM_PAGER_ERROR;
break;
}
- paddr = pmap_phys_address(mdpgno);
mapprot = ufi->entry->protection;
UVMHIST_LOG(maphist,
" MAPPING: device: pm=%p, va=0x%lx, pa=0x%lx, at=%ld",
diff --git a/sys/uvm/uvm_pmap.h b/sys/uvm/uvm_pmap.h
index 40a98394efc..ec9af64fcb0 100644
--- a/sys/uvm/uvm_pmap.h
+++ b/sys/uvm/uvm_pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_pmap.h,v 1.21 2010/11/18 21:21:38 miod Exp $ */
+/* $OpenBSD: uvm_pmap.h,v 1.22 2010/12/26 15:41:00 miod Exp $ */
/* $NetBSD: uvm_pmap.h,v 1.1 2000/06/27 09:00:14 mrg Exp $ */
/*
@@ -148,9 +148,6 @@ boolean_t pmap_is_referenced(struct vm_page *);
void pmap_page_protect(struct vm_page *, vm_prot_t);
-#if !defined(pmap_phys_address)
-paddr_t pmap_phys_address(paddr_t);
-#endif
#if !defined(pmap_proc_iflush)
void pmap_proc_iflush(struct proc *, vaddr_t, vsize_t);
#endif