--- old/usr/src/uts/sfmmu/vm/hat_sfmmu.c	2014-07-28 07:45:00.107890123 -0400
+++ new/usr/src/uts/sfmmu/vm/hat_sfmmu.c	2014-07-28 07:45:00.114390845 -0400
@@ -2151,7 +2151,7 @@
 		VN_HOLD(srdp->srd_evp);
 		ASSERT(srdp->srd_refcnt > 0);
 		newhat->sfmmu_srdp = srdp;
-		atomic_add_32((volatile uint_t *)&srdp->srd_refcnt, 1);
+		atomic_inc_32((volatile uint_t *)&srdp->srd_refcnt);
 	}
 
 	/*
@@ -3227,7 +3227,7 @@
 			panic("too high lckcnt-hmeblk %p",
 			    (void *)hmeblkp);
 		}
-		atomic_add_32(&hmeblkp->hblk_lckcnt, 1);
+		atomic_inc_32(&hmeblkp->hblk_lckcnt);
 
 		HBLK_STACK_TRACE(hmeblkp, HBLK_LOCK);
 	}
@@ -3262,9 +3262,9 @@
 
 	if (!TTE_IS_VALID(&tteold)) {
 
-		atomic_add_16(&hmeblkp->hblk_vcnt, 1);
+		atomic_inc_16(&hmeblkp->hblk_vcnt);
 		if (rid == SFMMU_INVALID_SHMERID) {
-			atomic_add_long(&sfmmup->sfmmu_ttecnt[size], 1);
+			atomic_inc_ulong(&sfmmup->sfmmu_ttecnt[size]);
 		} else {
 			sf_srd_t *srdp = sfmmup->sfmmu_srdp;
 			sf_region_t *rgnp = srdp->srd_hmergnp[rid];
@@ -3273,7 +3273,7 @@
 			 * during hat_join_region() processing. Here we
 			 * only update ttecnt's in region struture.
 			 */
-			atomic_add_long(&rgnp->rgn_ttecnt[size], 1);
+			atomic_inc_ulong(&rgnp->rgn_ttecnt[size]);
 		}
 	}
 
@@ -3381,7 +3381,7 @@
 	if (pp) {
 		if (!remap) {
 			HME_ADD(sfhme, pp);
-			atomic_add_16(&hmeblkp->hblk_hmecnt, 1);
+			atomic_inc_16(&hmeblkp->hblk_hmecnt);
 			ASSERT(hmeblkp->hblk_hmecnt > 0);
 
 			/*
@@ -4154,7 +4154,7 @@
 				panic("can't unlock large tte");
 
 			ASSERT(hmeblkp->hblk_lckcnt > 0);
-			atomic_add_32(&hmeblkp->hblk_lckcnt, -1);
+			atomic_dec_32(&hmeblkp->hblk_lckcnt);
 			HBLK_STACK_TRACE(hmeblkp, HBLK_UNLOCK);
 		} else {
 			panic("sfmmu_hblk_unlock: invalid tte");
@@ -6133,7 +6133,7 @@
 
 			if (flags & HAT_UNLOAD_UNLOCK) {
 				ASSERT(hmeblkp->hblk_lckcnt > 0);
-				atomic_add_32(&hmeblkp->hblk_lckcnt, -1);
+				atomic_dec_32(&hmeblkp->hblk_lckcnt);
 				HBLK_STACK_TRACE(hmeblkp, HBLK_UNLOCK);
 			}
 
@@ -6187,11 +6187,11 @@
 				 */
 				HME_SUB(sfhmep, pp);
 				membar_stst();
-				atomic_add_16(&hmeblkp->hblk_hmecnt, -1);
+				atomic_dec_16(&hmeblkp->hblk_hmecnt);
 			}
 
 			ASSERT(hmeblkp->hblk_vcnt > 0);
-			atomic_add_16(&hmeblkp->hblk_vcnt, -1);
+			atomic_dec_16(&hmeblkp->hblk_vcnt);
 
 			ASSERT(hmeblkp->hblk_hmecnt || hmeblkp->hblk_vcnt ||
 			    !hmeblkp->hblk_lckcnt);
@@ -7349,10 +7349,10 @@
 			cpuset = sfmmu_rgntlb_demap(addr, rgnp, hmeblkp, 1);
 			sfmmu_ttesync(NULL, addr, &tte, pp);
 			ASSERT(rgnp->rgn_ttecnt[ttesz] > 0);
-			atomic_add_long(&rgnp->rgn_ttecnt[ttesz], -1);
+			atomic_dec_ulong(&rgnp->rgn_ttecnt[ttesz]);
 		} else {
 			sfmmu_ttesync(sfmmup, addr, &tte, pp);
-			atomic_add_long(&sfmmup->sfmmu_ttecnt[ttesz], -1);
+			atomic_dec_ulong(&sfmmup->sfmmu_ttecnt[ttesz]);
 
 			/*
 			 * We need to flush the page from the virtual cache
@@ -7413,8 +7413,8 @@
 		 */
 		ASSERT(hmeblkp->hblk_hmecnt > 0);
 		ASSERT(hmeblkp->hblk_vcnt > 0);
-		atomic_add_16(&hmeblkp->hblk_vcnt, -1);
-		atomic_add_16(&hmeblkp->hblk_hmecnt, -1);
+		atomic_dec_16(&hmeblkp->hblk_vcnt);
+		atomic_dec_16(&hmeblkp->hblk_hmecnt);
 		/*
 		 * This is bug 4063182.
 		 * XXX: fixme
@@ -13813,8 +13813,8 @@
 			if (srdp->srd_evp == evp) {
 				ASSERT(srdp->srd_refcnt >= 0);
 				sfmmup->sfmmu_srdp = srdp;
-				atomic_add_32(
-				    (volatile uint_t *)&srdp->srd_refcnt, 1);
+				atomic_inc_32(
+				    (volatile uint_t *)&srdp->srd_refcnt);
 				mutex_exit(&srd_buckets[hash].srdb_lock);
 				return;
 			}
@@ -13835,7 +13835,7 @@
 		if (srdp->srd_evp == evp) {
 			ASSERT(srdp->srd_refcnt >= 0);
 			sfmmup->sfmmu_srdp = srdp;
-			atomic_add_32((volatile uint_t *)&srdp->srd_refcnt, 1);
+			atomic_inc_32((volatile uint_t *)&srdp->srd_refcnt);
 			mutex_exit(&srd_buckets[hash].srdb_lock);
 			kmem_cache_free(srd_cache, newsrdp);
 			return;
@@ -13872,8 +13872,7 @@
 	sfmmup->sfmmu_srdp = NULL;
 	evp = srdp->srd_evp;
 	ASSERT(evp != NULL);
-	if (atomic_add_32_nv(
-	    (volatile uint_t *)&srdp->srd_refcnt, -1)) {
+	if (atomic_dec_32_nv((volatile uint_t *)&srdp->srd_refcnt)) {
 		VN_RELE(evp);
 		return;
 	}
@@ -14090,7 +14089,7 @@
 		ASSERT(rid < maxids);
 		ASSERT(rarrp[rid] == rgnp);
 		ASSERT(rid < *nextidp);
-		atomic_add_32((volatile uint_t *)&rgnp->rgn_refcnt, 1);
+		atomic_inc_32((volatile uint_t *)&rgnp->rgn_refcnt);
 		mutex_exit(&srdp->srd_mutex);
 		if (new_rgnp != NULL) {
 			kmem_cache_free(region_cache, new_rgnp);
@@ -14440,7 +14439,7 @@
 	}
 
 	r_obj = rgnp->rgn_obj;
-	if (atomic_add_32_nv((volatile uint_t *)&rgnp->rgn_refcnt, -1)) {
+	if (atomic_dec_32_nv((volatile uint_t *)&rgnp->rgn_refcnt)) {
 		return;
 	}
 
@@ -14525,7 +14524,7 @@
 	ASSERT((rgnp->rgn_flags & SFMMU_REGION_TYPE_MASK) == SFMMU_REGION_HME);
 	ASSERT(!(rgnp->rgn_flags & SFMMU_REGION_FREE));
 
-	atomic_add_32((volatile uint_t *)&rgnp->rgn_refcnt, 1);
+	atomic_inc_32((volatile uint_t *)&rgnp->rgn_refcnt);
 
 	/* LINTED: constant in conditional context */
 	SFMMU_HMERID2RLINKP(sfmmup, rid, rlink, 1, 0);
@@ -15255,8 +15254,7 @@
 			mutex_exit(&srdp->srd_scd_mutex);
 			sfmmu_join_scd(scdp, sfmmup);
 			ASSERT(scdp->scd_refcnt >= 2);
-			atomic_add_32((volatile uint32_t *)
-			    &scdp->scd_refcnt, -1);
+			atomic_dec_32((volatile uint32_t *)&scdp->scd_refcnt);
 			return;
 		} else {
 			/*
@@ -15301,7 +15299,7 @@
 	mutex_exit(&srdp->srd_scd_mutex);
 	sfmmu_join_scd(new_scdp, sfmmup);
 	ASSERT(new_scdp->scd_refcnt >= 2);
-	atomic_add_32((volatile uint32_t *)&new_scdp->scd_refcnt, -1);
+	atomic_dec_32((volatile uint32_t *)&new_scdp->scd_refcnt);
 }
 
 /*
