Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Make uvm_fault_unwire() take a vm_map_t, rather than...
details: https://anonhg.NetBSD.org/src/rev/90018322e8f3
branches: trunk
changeset: 473308:90018322e8f3
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri May 28 20:49:51 1999 +0000
description:
Make uvm_fault_unwire() take a vm_map_t, rather than a pmap_t, for
consistency. Use this opportunity for checking for intrsafe map use
in this routine (which is illegal).
diffstat:
sys/uvm/uvm_fault.c | 16 ++++++++++------
sys/uvm/uvm_fault.h | 4 ++--
sys/uvm/uvm_glue.c | 6 +++---
sys/uvm/uvm_map.c | 4 ++--
4 files changed, 17 insertions(+), 13 deletions(-)
diffs (108 lines):
diff -r 090863d4ba91 -r 90018322e8f3 sys/uvm/uvm_fault.c
--- a/sys/uvm/uvm_fault.c Fri May 28 20:31:42 1999 +0000
+++ b/sys/uvm/uvm_fault.c Fri May 28 20:49:51 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_fault.c,v 1.30 1999/05/26 00:32:42 thorpej Exp $ */
+/* $NetBSD: uvm_fault.c,v 1.31 1999/05/28 20:49:51 thorpej Exp $ */
/*
*
@@ -1719,7 +1719,7 @@
rv = uvm_fault(map, va, VM_FAULT_WIRE, access_type);
if (rv) {
if (va != start) {
- uvm_fault_unwire(map->pmap, start, va);
+ uvm_fault_unwire(map, start, va);
}
return (rv);
}
@@ -1730,19 +1730,23 @@
/*
* uvm_fault_unwire(): unwire range of virtual space.
- *
- * => caller holds reference to pmap (via its map)
*/
void
-uvm_fault_unwire(pmap, start, end)
- struct pmap *pmap;
+uvm_fault_unwire(map, start, end)
+ vm_map_t map;
vaddr_t start, end;
{
+ pmap_t pmap = vm_map_pmap(map);
vaddr_t va;
paddr_t pa;
struct vm_page *pg;
+#ifdef DIAGNOSTIC
+ if (map->flags & VM_MAP_INTRSAFE)
+ panic("uvm_fault_unwire: intrsafe map");
+#endif
+
/*
* we assume that the area we are unwiring has actually been wired
* in the first place. this means that we should be able to extract
diff -r 090863d4ba91 -r 90018322e8f3 sys/uvm/uvm_fault.h
--- a/sys/uvm/uvm_fault.h Fri May 28 20:31:42 1999 +0000
+++ b/sys/uvm/uvm_fault.h Fri May 28 20:49:51 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_fault.h,v 1.9 1999/05/26 00:32:42 thorpej Exp $ */
+/* $NetBSD: uvm_fault.h,v 1.10 1999/05/28 20:49:51 thorpej Exp $ */
/*
*
@@ -79,6 +79,6 @@
static void uvmfault_unlockmaps __P((struct uvm_faultinfo *, boolean_t));
int uvm_fault_wire __P((vm_map_t, vaddr_t, vaddr_t, vm_prot_t));
-void uvm_fault_unwire __P((struct pmap *, vaddr_t, vaddr_t));
+void uvm_fault_unwire __P((vm_map_t, vaddr_t, vaddr_t));
#endif /* _UVM_UVM_FAULT_H_ */
diff -r 090863d4ba91 -r 90018322e8f3 sys/uvm/uvm_glue.c
--- a/sys/uvm/uvm_glue.c Fri May 28 20:31:42 1999 +0000
+++ b/sys/uvm/uvm_glue.c Fri May 28 20:49:51 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_glue.c,v 1.22 1999/05/26 01:05:26 thorpej Exp $ */
+/* $NetBSD: uvm_glue.c,v 1.23 1999/05/28 20:49:51 thorpej Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -248,7 +248,7 @@
caddr_t addr;
size_t len;
{
- uvm_fault_unwire(p->p_vmspace->vm_map.pmap, trunc_page(addr),
+ uvm_fault_unwire(&p->p_vmspace->vm_map, trunc_page(addr),
round_page(addr+len));
}
@@ -592,7 +592,7 @@
* Unwire the to-be-swapped process's user struct and kernel stack.
*/
addr = (vaddr_t)p->p_addr;
- uvm_fault_unwire(kernel_map->pmap, addr, addr + USPACE); /* !P_INMEM */
+ uvm_fault_unwire(kernel_map, addr, addr + USPACE); /* !P_INMEM */
pmap_collect(vm_map_pmap(&p->p_vmspace->vm_map));
/*
diff -r 090863d4ba91 -r 90018322e8f3 sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Fri May 28 20:31:42 1999 +0000
+++ b/sys/uvm/uvm_map.c Fri May 28 20:49:51 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_map.c,v 1.47 1999/05/28 20:31:43 thorpej Exp $ */
+/* $NetBSD: uvm_map.c,v 1.48 1999/05/28 20:49:51 thorpej Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -314,7 +314,7 @@
vm_map_entry_t entry;
{
- uvm_fault_unwire(map->pmap, entry->start, entry->end);
+ uvm_fault_unwire(map, entry->start, entry->end);
entry->wired_count = 0;
}
Home |
Main Index |
Thread Index |
Old Index