Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Back out the change I made yesterday. It seems to c...
details: https://anonhg.NetBSD.org/src/rev/8509cb87031d
branches: trunk
changeset: 474564:8509cb87031d
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Jul 11 17:47:12 1999 +0000
description:
Back out the change I made yesterday. It seems to cause some trouble
for some folks.
diffstat:
sys/uvm/uvm_fault.c | 58 ++++++++++++++++++++++++++++------------------------
1 files changed, 31 insertions(+), 27 deletions(-)
diffs (83 lines):
diff -r 99e1bd84a2db -r 8509cb87031d sys/uvm/uvm_fault.c
--- a/sys/uvm/uvm_fault.c Sun Jul 11 17:45:11 1999 +0000
+++ b/sys/uvm/uvm_fault.c Sun Jul 11 17:47:12 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_fault.c,v 1.41 1999/07/10 21:46:56 thorpej Exp $ */
+/* $NetBSD: uvm_fault.c,v 1.42 1999/07/11 17:47:12 thorpej Exp $ */
/*
*
@@ -1771,9 +1771,9 @@
{
vm_map_entry_t entry;
pmap_t pmap = vm_map_pmap(map);
- vaddr_t lim;
+ vaddr_t va;
paddr_t pa;
- vm_page_t pg;
+ struct vm_page *pg;
#ifdef DIAGNOSTIC
if (map->flags & VM_MAP_INTRSAFE)
@@ -1799,33 +1799,37 @@
if (uvm_map_lookup_entry(map, start, &entry) == FALSE)
panic("uvm_fault_unwire_locked: address not in map");
- for (/* nothing */;
- entry != &map->header && entry->start < end;
- entry = entry->next) {
-#ifdef DIAGNOSTIC
- if (UVM_ET_ISSUBMAP(entry))
- panic("uvm_fault_unwire_locked: submap");
- if (entry->end < end &&
- (entry->next == &map->header ||
- entry->next->start > entry->end))
- panic("uvm_fault_unwire_locked: hole");
-#endif
-
- lim = end > entry->end ? end : entry->end;
+ for (va = start; va < end ; va += PAGE_SIZE) {
+ if (pmap_extract(pmap, va, &pa) == FALSE)
+ panic("uvm_fault_unwire_locked: unwiring "
+ "non-wired memory");
- for (/* nothing */; start < lim; start += PAGE_SIZE) {
- if (pmap_extract(pmap, start, &pa) == FALSE)
- panic("uvm_fault_unwire_locked: unwiring "
- "non-wired memory");
+ /*
+ * make sure the current entry is for the address we're
+ * dealing with. if not, grab the next entry.
+ */
+#ifdef DIAGNOSTIC
+ if (va < entry->start)
+ panic("uvm_fault_unwire_locked: hole 1");
+#endif
+ if (va >= entry->end) {
+#ifdef DIAGNOSTIC
+ if (entry->next == &map->header ||
+ entry->next->start > entry->end)
+ panic("uvm_fault_unwire_locked: hole 2");
+#endif
+ entry = entry->next;
+ }
- /* If the entry is no longer wired, tell the pmap. */
- if (VM_MAPENT_ISWIRED(entry) == 0)
- pmap_unwire(pmap, start);
+ /*
+ * if the entry is no longer wired, tell the pmap.
+ */
+ if (VM_MAPENT_ISWIRED(entry) == 0)
+ pmap_unwire(pmap, va);
- pg = PHYS_TO_VM_PAGE(pa);
- if (pg != NULL)
- uvm_pageunwire(pg);
- }
+ pg = PHYS_TO_VM_PAGE(pa);
+ if (pg)
+ uvm_pageunwire(pg);
}
uvm_unlock_pageq();
Home |
Main Index |
Thread Index |
Old Index