- rename VMCNT_DEC to VMCNT_SUB to reflect the count argument.
Suggested by: julian@ Contributed by: attilio@
This commit is contained in:
parent
027ae03b49
commit
953418f0d5
@ -1149,7 +1149,7 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m,
|
||||
*/
|
||||
m->right = *free;
|
||||
*free = m;
|
||||
VMCNT_DEC(wire_count, 1);
|
||||
VMCNT_SUB(wire_count, 1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1459,7 +1459,7 @@ pmap_release(pmap_t pmap)
|
||||
pmap->pm_pml4[PML4PML4I] = 0; /* Recursive Mapping */
|
||||
|
||||
m->wire_count--;
|
||||
VMCNT_DEC(wire_count, 1);
|
||||
VMCNT_SUB(wire_count, 1);
|
||||
vm_page_free_zero(m);
|
||||
PMAP_LOCK_DESTROY(pmap);
|
||||
}
|
||||
|
@ -1168,7 +1168,7 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free)
|
||||
pmap->pm_pdir[m->pindex] = 0;
|
||||
--pmap->pm_stats.resident_count;
|
||||
|
||||
VMCNT_DEC(wire_count, 1);
|
||||
VMCNT_SUB(wire_count, 1);
|
||||
|
||||
/*
|
||||
* Do an invltlb to make the invalidated mapping
|
||||
@ -1536,7 +1536,7 @@ pmap_release(pmap_t pmap)
|
||||
("pmap_release: got wrong ptd page"));
|
||||
#endif
|
||||
m->wire_count--;
|
||||
VMCNT_DEC(wire_count, 1);
|
||||
VMCNT_SUB(wire_count, 1);
|
||||
vm_page_free_zero(m);
|
||||
}
|
||||
PMAP_LOCK_DESTROY(pmap);
|
||||
|
@ -1088,7 +1088,7 @@ pmap_release(pmap_t pm)
|
||||
("pmap_release: freeing held tsb page"));
|
||||
m->md.pmap = NULL;
|
||||
m->wire_count--;
|
||||
VMCNT_DEC(wire_count, 1);
|
||||
VMCNT_SUB(wire_count, 1);
|
||||
vm_page_free_zero(m);
|
||||
vm_page_unlock_queues();
|
||||
}
|
||||
|
@ -1312,7 +1312,7 @@ pmap_free_contig_pages(void *ptr, int npages)
|
||||
m = PHYS_TO_VM_PAGE(TLB_DIRECT_TO_PHYS((vm_offset_t)ptr));
|
||||
for (i = 0; i < npages; i++, m++) {
|
||||
m->wire_count--;
|
||||
VMCNT_DEC(wire_count, 1);
|
||||
VMCNT_SUB(wire_count, 1);
|
||||
vm_page_free(m);
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ tsb_deinit(hv_tsb_info_t *hvtsb)
|
||||
m = PHYS_TO_VM_PAGE((vm_paddr_t)hvtsb->hti_ra);
|
||||
for (i = 0, tm = m; i < TSB_SIZE; i++, m++) {
|
||||
tm->wire_count--;
|
||||
VMCNT_DEC(wire_count, 1);
|
||||
VMCNT_SUB(wire_count, 1);
|
||||
vm_page_free(tm);
|
||||
}
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ free_fragment_pages(void *ptr)
|
||||
for (fh = ptr; fh != NULL; fh = fh->thf_head.fh_next) {
|
||||
m = PHYS_TO_VM_PAGE(TLB_DIRECT_TO_PHYS((vm_offset_t)fh));
|
||||
m->wire_count--;
|
||||
VMCNT_DEC(wire_count, 1);
|
||||
VMCNT_SUB(wire_count, 1);
|
||||
vm_page_free(m);
|
||||
}
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ extern volatile struct vmmeter cnt;
|
||||
atomic_store_rel_int(__CONCAT(&cnt.v_, member), val)
|
||||
#define VMCNT_ADD(member, val) \
|
||||
atomic_add_int(__CONCAT(&cnt.v_, member), val)
|
||||
#define VMCNT_DEC(member, val) \
|
||||
#define VMCNT_SUB(member, val) \
|
||||
atomic_subtract_int(__CONCAT(&cnt.v_, member), val)
|
||||
#define VMCNT_GET(member) (__CONCAT(cnt.v_, member))
|
||||
#define VMCNT_PTR(member) \
|
||||
|
@ -1249,7 +1249,7 @@ vm_page_unwire(vm_page_t m, int activate)
|
||||
if (m->wire_count > 0) {
|
||||
m->wire_count--;
|
||||
if (m->wire_count == 0) {
|
||||
VMCNT_DEC(wire_count, 1);
|
||||
VMCNT_SUB(wire_count, 1);
|
||||
if (m->flags & PG_UNMANAGED) {
|
||||
;
|
||||
} else if (activate)
|
||||
|
Loading…
Reference in New Issue
Block a user