Back out the change I made yesterday. It seems to cause some trouble

for some folks.
This commit is contained in:
thorpej 1999-07-11 17:47:12 +00:00
parent 4502752019
commit ff05773b4a

View File

@ -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 @@ uvm_fault_unwire_locked(map, start, end)
{
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 @@ uvm_fault_unwire_locked(map, start, end)
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) {
for (va = start; va < end ; va += PAGE_SIZE) {
if (pmap_extract(pmap, va, &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 (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");
if (va < entry->start)
panic("uvm_fault_unwire_locked: hole 1");
#endif
lim = end > entry->end ? end : entry->end;
for (/* nothing */; start < lim; start += PAGE_SIZE) {
if (pmap_extract(pmap, start, &pa) == FALSE)
panic("uvm_fault_unwire_locked: unwiring "
"non-wired memory");
/* If the entry is no longer wired, tell the pmap. */
if (VM_MAPENT_ISWIRED(entry) == 0)
pmap_unwire(pmap, start);
pg = PHYS_TO_VM_PAGE(pa);
if (pg != NULL)
uvm_pageunwire(pg);
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, va);
pg = PHYS_TO_VM_PAGE(pa);
if (pg)
uvm_pageunwire(pg);
}
uvm_unlock_pageq();