diff options
-rw-r--r-- | sys/amd64/amd64/pmap.c | 4 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 4 | ||||
-rw-r--r-- | sys/sparc64/sparc64/pmap.c | 2 | ||||
-rw-r--r-- | sys/sun4v/sun4v/pmap.c | 2 | ||||
-rw-r--r-- | sys/sun4v/sun4v/tsb.c | 2 | ||||
-rw-r--r-- | sys/sun4v/sun4v/tte_hash.c | 2 | ||||
-rw-r--r-- | sys/sys/vmmeter.h | 2 | ||||
-rw-r--r-- | sys/vm/vm_page.c | 2 |
8 files changed, 10 insertions, 10 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 9080449..4f33e92 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -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); } diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 21f4735..6a14079 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -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); diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c index 07d19b2..da8bcf0 100644 --- a/sys/sparc64/sparc64/pmap.c +++ b/sys/sparc64/sparc64/pmap.c @@ -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(); } diff --git a/sys/sun4v/sun4v/pmap.c b/sys/sun4v/sun4v/pmap.c index 5db5f99..bbb467d 100644 --- a/sys/sun4v/sun4v/pmap.c +++ b/sys/sun4v/sun4v/pmap.c @@ -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); } } diff --git a/sys/sun4v/sun4v/tsb.c b/sys/sun4v/sun4v/tsb.c index 764fc4c..a317583 100644 --- a/sys/sun4v/sun4v/tsb.c +++ b/sys/sun4v/sun4v/tsb.c @@ -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); } } diff --git a/sys/sun4v/sun4v/tte_hash.c b/sys/sun4v/sun4v/tte_hash.c index 9da1a9a..ca507f7 100644 --- a/sys/sun4v/sun4v/tte_hash.c +++ b/sys/sun4v/sun4v/tte_hash.c @@ -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); } } diff --git a/sys/sys/vmmeter.h b/sys/sys/vmmeter.h index 375a2ce..7defd2d 100644 --- a/sys/sys/vmmeter.h +++ b/sys/sys/vmmeter.h @@ -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) \ diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index f4f0a20..2e97237 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -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) |