struct vm_map_entry *next_entry;
vm_map_entry_t next_entry;
uvm_unmap_detach(first_entry, flags)	struct vm_map_entry *first_entry;	int flags;{	struct vm_map_entry *next_entry;	UVMHIST_FUNC("uvm_unmap_detach"); UVMHIST_CALLED(maphist);	while (first_entry) {		KASSERT(!VM_MAPENT_ISWIRED(first_entry));		UVMHIST_LOG(maphist,		    "  detach 0x%x: amap=0x%x, obj=0x%x, submap?=%d",		    first_entry, first_entry->aref.ar_amap,		    first_entry->object.uvm_obj,		    UVM_ET_ISSUBMAP(first_entry));		/*		 * drop reference to amap, if we've got one		 */		if (first_entry->aref.ar_amap)			uvm_map_unreference_amap(first_entry, flags);		/*		 * drop reference to our backing object, if we've got one		 */		if (UVM_ET_ISSUBMAP(first_entry)) {			/* ... unlikely to happen, but play it safe */			uvm_map_deallocate(first_entry->object.sub_map);		} else {			if (UVM_ET_ISOBJ(first_entry) &&			    first_entry->object.uvm_obj->pgops->pgo_detach)				first_entry->object.uvm_obj->pgops->				    pgo_detach(first_entry->object.uvm_obj);		}		next_entry = first_entry->next;		uvm_mapent_free(first_entry);		first_entry = next_entry;	}	UVMHIST_LOG(maphist, "<- done", 0,0,0,0);}