--- old/usr/src/uts/common/crypto/io/crypto.c	2014-07-28 07:44:13.013743572 -0400
+++ new/usr/src/uts/common/crypto/io/crypto.c	2014-07-28 07:44:13.020243551 -0400
@@ -627,7 +627,7 @@
 	mutex_enter(&mp->kl_lock);
 
 	if ((cm = crypto_minors[minor - 1]) != NULL) {
-		atomic_add_32(&cm->cm_refcnt, 1);
+		atomic_inc_32(&cm->cm_refcnt);
 	}
 	mutex_exit(&mp->kl_lock);
 	return (cm);
@@ -636,7 +636,7 @@
 static void
 crypto_release_minor(crypto_minor_t *cm)
 {
-	if (atomic_add_32_nv(&cm->cm_refcnt, -1) == 0) {
+	if (atomic_dec_32_nv(&cm->cm_refcnt) == 0) {
 		cv_signal(&cm->cm_cv);
 	}
 }
--- old/usr/src/uts/common/crypto/io/dprov.c	2014-07-28 07:44:13.399785246 -0400
+++ new/usr/src/uts/common/crypto/io/dprov.c	2014-07-28 07:44:13.406046221 -0400
@@ -1101,7 +1101,7 @@
  * it REFHOLD()s.
  */
 #define	DPROV_OBJECT_REFHOLD(object) {		\
-	atomic_add_32(&(object)->do_refcnt, 1);	\
+	atomic_inc_32(&(object)->do_refcnt);	\
 	ASSERT((object)->do_refcnt != 0);		\
 }
 
@@ -1112,7 +1112,7 @@
 #define	DPROV_OBJECT_REFRELE(object) {				\
 	ASSERT((object)->do_refcnt != 0);			\
 	membar_exit();						\
-	if (atomic_add_32_nv(&(object)->do_refcnt, -1) == 0)	\
+	if (atomic_dec_32_nv(&(object)->do_refcnt) == 0)	\
 		dprov_free_object(object);			\
 }
 
--- old/usr/src/uts/common/disp/cmt.c	2014-07-28 07:44:13.896525347 -0400
+++ new/usr/src/uts/common/disp/cmt.c	2014-07-28 07:44:13.902475878 -0400
@@ -1358,9 +1358,9 @@
 	pg_cmt_t	*cmt_pg = (pg_cmt_t *)pg;
 
 	if (old == cp->cpu_idle_thread) {
-		atomic_add_32(&cmt_pg->cmt_utilization, 1);
+		atomic_inc_32(&cmt_pg->cmt_utilization);
 	} else if (new == cp->cpu_idle_thread) {
-		atomic_add_32(&cmt_pg->cmt_utilization, -1);
+		atomic_dec_32(&cmt_pg->cmt_utilization);
 	}
 }
 
@@ -1383,7 +1383,7 @@
 
 	if (old == cp->cpu_idle_thread) {
 		ASSERT(new != cp->cpu_idle_thread);
-		u = atomic_add_32_nv(&cmt->cmt_utilization, 1);
+		u = atomic_inc_32_nv(&cmt->cmt_utilization);
 		if (u == 1) {
 			/*
 			 * Notify the CPU power manager that the domain
@@ -1395,7 +1395,7 @@
 		}
 	} else if (new == cp->cpu_idle_thread) {
 		ASSERT(old != cp->cpu_idle_thread);
-		u = atomic_add_32_nv(&cmt->cmt_utilization, -1);
+		u = atomic_dec_32_nv(&cmt->cmt_utilization);
 		if (u == 0) {
 			/*
 			 * The domain is idle, notify the CPU power
--- old/usr/src/uts/common/dtrace/fasttrap.c	2014-07-28 07:44:14.140211425 -0400
+++ new/usr/src/uts/common/dtrace/fasttrap.c	2014-07-28 07:44:14.146117015 -0400
@@ -1182,7 +1182,7 @@
 			mutex_enter(&fprc->ftpc_mtx);
 			mutex_exit(&bucket->ftb_mtx);
 			fprc->ftpc_rcount++;
-			atomic_add_64(&fprc->ftpc_acount, 1);
+			atomic_inc_64(&fprc->ftpc_acount);
 			ASSERT(fprc->ftpc_acount <= fprc->ftpc_rcount);
 			mutex_exit(&fprc->ftpc_mtx);
 
@@ -1212,7 +1212,7 @@
 			mutex_enter(&fprc->ftpc_mtx);
 			mutex_exit(&bucket->ftb_mtx);
 			fprc->ftpc_rcount++;
-			atomic_add_64(&fprc->ftpc_acount, 1);
+			atomic_inc_64(&fprc->ftpc_acount);
 			ASSERT(fprc->ftpc_acount <= fprc->ftpc_rcount);
 			mutex_exit(&fprc->ftpc_mtx);
 
@@ -1424,7 +1424,7 @@
 	 * count of active providers on the associated process structure.
 	 */
 	if (!provider->ftp_retired) {
-		atomic_add_64(&provider->ftp_proc->ftpc_acount, -1);
+		atomic_dec_64(&provider->ftp_proc->ftpc_acount);
 		ASSERT(provider->ftp_proc->ftpc_acount <
 		    provider->ftp_proc->ftpc_rcount);
 	}
@@ -1499,7 +1499,7 @@
 	 * bucket lock therefore protects the integrity of the provider hash
 	 * table.
 	 */
-	atomic_add_64(&fp->ftp_proc->ftpc_acount, -1);
+	atomic_dec_64(&fp->ftp_proc->ftpc_acount);
 	ASSERT(fp->ftp_proc->ftpc_acount < fp->ftp_proc->ftpc_rcount);
 
 	fp->ftp_retired = 1;
@@ -1595,10 +1595,10 @@
 			    pdata->ftps_mod, pdata->ftps_func, name_str) != 0)
 				continue;
 
-			atomic_add_32(&fasttrap_total, 1);
+			atomic_inc_32(&fasttrap_total);
 
 			if (fasttrap_total > fasttrap_max) {
-				atomic_add_32(&fasttrap_total, -1);
+				atomic_dec_32(&fasttrap_total);
 				goto no_mem;
 			}
 
--- old/usr/src/uts/common/dtrace/profile.c	2014-07-28 07:44:14.386401650 -0400
+++ new/usr/src/uts/common/dtrace/profile.c	2014-07-28 07:44:14.392290253 -0400
@@ -171,9 +171,9 @@
 	if (dtrace_probe_lookup(profile_id, NULL, NULL, name) != 0)
 		return;
 
-	atomic_add_32(&profile_total, 1);
+	atomic_inc_32(&profile_total);
 	if (profile_total > profile_max) {
-		atomic_add_32(&profile_total, -1);
+		atomic_dec_32(&profile_total);
 		return;
 	}
 
@@ -328,7 +328,7 @@
 	kmem_free(prof, sizeof (profile_probe_t));
 
 	ASSERT(profile_total >= 1);
-	atomic_add_32(&profile_total, -1);
+	atomic_dec_32(&profile_total);
 }
 
 /*ARGSUSED*/
--- old/usr/src/uts/common/fs/ctfs/ctfs_root.c	2014-07-28 07:44:14.566678427 -0400
+++ new/usr/src/uts/common/fs/ctfs/ctfs_root.c	2014-07-28 07:44:14.573017571 -0400
@@ -240,7 +240,7 @@
 	vfsp->vfs_fstype = ctfs_fstype;
 	do {
 		dev = makedevice(ctfs_major,
-		    atomic_add_32_nv(&ctfs_minor, 1) & L_MAXMIN32);
+		    atomic_inc_32_nv(&ctfs_minor) & L_MAXMIN32);
 	} while (vfs_devismounted(dev));
 	vfs_make_fsid(&vfsp->vfs_fsid, dev, ctfs_fstype);
 	vfsp->vfs_data = data;
--- old/usr/src/uts/common/fs/dnlc.c	2014-07-28 07:44:14.743979035 -0400
+++ new/usr/src/uts/common/fs/dnlc.c	2014-07-28 07:44:14.750010212 -0400
@@ -254,7 +254,7 @@
 #define	dnlc_free(ncp) \
 { \
 	kmem_free((ncp), sizeof (ncache_t) + (ncp)->namlen); \
-	atomic_add_32(&dnlc_nentries, -1); \
+	atomic_dec_32(&dnlc_nentries); \
 }
 
 
@@ -1024,7 +1024,7 @@
 		return (NULL);
 	}
 	ncp->namlen = namlen;
-	atomic_add_32(&dnlc_nentries, 1);
+	atomic_inc_32(&dnlc_nentries);
 	dnlc_reduce_cache(NULL);
 	return (ncp);
 }
--- old/usr/src/uts/common/fs/fem.c	2014-07-28 07:44:14.976107734 -0400
+++ new/usr/src/uts/common/fs/fem.c	2014-07-28 07:44:14.982107668 -0400
@@ -367,13 +367,13 @@
 static void
 fem_addref(struct fem_list *sp)
 {
-	atomic_add_32(&sp->feml_refc, 1);
+	atomic_inc_32(&sp->feml_refc);
 }
 
 static uint32_t
 fem_delref(struct fem_list *sp)
 {
-	return (atomic_add_32_nv(&sp->feml_refc, -1));
+	return (atomic_dec_32_nv(&sp->feml_refc));
 }
 
 static struct fem_list *
--- old/usr/src/uts/common/fs/lofs/lofs_subr.c	2014-07-28 07:44:15.260713723 -0400
+++ new/usr/src/uts/common/fs/lofs/lofs_subr.c	2014-07-28 07:44:15.266644104 -0400
@@ -23,8 +23,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * The idea behind composition-based stacked filesystems is to add a
  * vnode to the stack of vnodes for each mount. These vnodes have their
@@ -289,7 +287,7 @@
 			}
 			lp = tlp;
 		}
-		atomic_add_32(&li->li_refct, 1);
+		atomic_inc_32(&li->li_refct);
 		vfsp = makelfsnode(vp->v_vfsp, li);
 		lp->lo_vnode = nvp;
 		VN_SET_VFS_TYPE_DEV(nvp, vfsp, vp->v_type, vp->v_rdev);
@@ -632,7 +630,7 @@
 
 	ASSERT(MUTEX_HELD(&li->li_lfslock));
 	ASSERT(vfsp->vfs_count > 1);
-	if (atomic_add_32_nv(&vfsp->vfs_count, -1) == 1)
+	if (atomic_dec_32_nv(&vfsp->vfs_count) == 1)
 		freelfsnode(lfs, li);
 }
 
@@ -672,7 +670,7 @@
 			lo_dprint(4, "freeing %p, vfsp %p\n",
 			    vp, vp->v_vfsp);
 #endif
-			atomic_add_32(&li->li_refct, -1);
+			atomic_dec_32(&li->li_refct);
 			vfsp = vp->v_vfsp;
 			vn_invalid(vp);
 			if (vfsp != li->li_mountvfs) {
--- old/usr/src/uts/common/fs/mntfs/mntvnops.c	2014-07-28 07:44:15.448411719 -0400
+++ new/usr/src/uts/common/fs/mntfs/mntvnops.c	2014-07-28 07:44:15.454417604 -0400
@@ -852,7 +852,7 @@
 	nmnp = mntgetnode(vp);
 
 	*vpp = MTOV(nmnp);
-	atomic_add_32(&MTOD(nmnp)->mnt_nopen, 1);
+	atomic_inc_32(&MTOD(nmnp)->mnt_nopen);
 	VN_RELE(vp);
 	return (0);
 }
@@ -875,7 +875,7 @@
 		mntfs_freesnap(mnp, &mnp->mnt_read);
 		mntfs_freesnap(mnp, &mnp->mnt_ioctl);
 		rw_exit(&mnp->mnt_contents);
-		atomic_add_32(&MTOD(mnp)->mnt_nopen, -1);
+		atomic_dec_32(&MTOD(mnp)->mnt_nopen);
 	}
 	return (0);
 }
--- old/usr/src/uts/common/fs/nfs/nfs3_vnops.c	2014-07-28 07:44:15.674317744 -0400
+++ new/usr/src/uts/common/fs/nfs/nfs3_vnops.c	2014-07-28 07:44:15.680559549 -0400
@@ -5276,11 +5276,11 @@
 
 	if (nfs_rw_enter_sig(&rp->r_rwlock, RW_WRITER, INTR(vp)))
 		return (EINTR);
-	atomic_add_int(&rp->r_inmap, 1);
+	atomic_inc_uint(&rp->r_inmap);
 	nfs_rw_exit(&rp->r_rwlock);
 
 	if (nfs_rw_enter_sig(&rp->r_lkserlock, RW_READER, INTR(vp))) {
-		atomic_add_int(&rp->r_inmap, -1);
+		atomic_dec_uint(&rp->r_inmap);
 		return (EINTR);
 	}
 
@@ -5322,7 +5322,7 @@
 
 done:
 	nfs_rw_exit(&rp->r_lkserlock);
-	atomic_add_int(&rp->r_inmap, -1);
+	atomic_dec_uint(&rp->r_inmap);
 	return (error);
 }
 
--- old/usr/src/uts/common/fs/nfs/nfs4_client.c	2014-07-28 07:44:16.052739958 -0400
+++ new/usr/src/uts/common/fs/nfs/nfs4_client.c	2014-07-28 07:44:16.058636111 -0400
@@ -3148,7 +3148,7 @@
 void
 mi_hold(mntinfo4_t *mi)
 {
-	atomic_add_32(&mi->mi_count, 1);
+	atomic_inc_32(&mi->mi_count);
 	ASSERT(mi->mi_count != 0);
 }
 
@@ -3156,7 +3156,7 @@
 mi_rele(mntinfo4_t *mi)
 {
 	ASSERT(mi->mi_count != 0);
-	if (atomic_add_32_nv(&mi->mi_count, -1) == 0) {
+	if (atomic_dec_32_nv(&mi->mi_count) == 0) {
 		nfs_free_mi4(mi);
 	}
 }
@@ -4111,7 +4111,7 @@
 void
 fn_hold(nfs4_fname_t *fnp)
 {
-	atomic_add_32(&fnp->fn_refcnt, 1);
+	atomic_inc_32(&fnp->fn_refcnt);
 	NFS4_DEBUG(nfs4_fname_debug, (CE_NOTE,
 	    "fn_hold %p:%s, new refcnt=%d",
 	    (void *)fnp, fnp->fn_name, fnp->fn_refcnt));
@@ -4137,7 +4137,7 @@
 	parent = fnp->fn_parent;
 	if (parent != NULL)
 		mutex_enter(&parent->fn_lock);	/* prevent new references */
-	newref = atomic_add_32_nv(&fnp->fn_refcnt, -1);
+	newref = atomic_dec_32_nv(&fnp->fn_refcnt);
 	if (newref > 0) {
 		NFS4_DEBUG(nfs4_fname_debug, (CE_NOTE,
 		    "fn_rele %p:%s, new refcnt=%d",
--- old/usr/src/uts/common/fs/nfs/nfs4_client_state.c	2014-07-28 07:44:16.356742904 -0400
+++ new/usr/src/uts/common/fs/nfs/nfs4_client_state.c	2014-07-28 07:44:16.362755176 -0400
@@ -673,7 +673,7 @@
 uint64_t
 nfs4_get_new_oo_name(void)
 {
-	return (atomic_add_64_nv(&open_owner_seq_num, 1));
+	return (atomic_inc_64_nv(&open_owner_seq_num));
 }
 
 /*
@@ -836,7 +836,7 @@
 	 * A Solaris lock_owner is <seq_num><pid>
 	 */
 	lop->lock_owner_name.ln_seq_num =
-	    atomic_add_64_nv(&lock_owner_seq_num, 1);
+	    atomic_inc_64_nv(&lock_owner_seq_num);
 	lop->lock_owner_name.ln_pid = pid;
 
 	cv_init(&lop->lo_cv_seqid_sync, NULL, CV_DEFAULT, NULL);
@@ -883,7 +883,7 @@
 	 * A Solaris lock_owner is <seq_num><pid>
 	 */
 	cast_namep = (nfs4_lo_name_t *)owner->owner_val;
-	cast_namep->ln_seq_num = atomic_add_64_nv(&lock_owner_seq_num, 1);
+	cast_namep->ln_seq_num = atomic_inc_64_nv(&lock_owner_seq_num);
 	cast_namep->ln_pid = pid;
 }
 
--- old/usr/src/uts/common/fs/nfs/nfs4_db.c	2014-07-28 07:44:16.601997820 -0400
+++ new/usr/src/uts/common/fs/nfs/nfs4_db.c	2014-07-28 07:44:16.607981182 -0400
@@ -60,7 +60,7 @@
 void
 rfs4_dbe_hold(rfs4_dbe_t *entry)
 {
-	atomic_add_32(&entry->dbe_refcnt, 1);
+	atomic_inc_32(&entry->dbe_refcnt);
 }
 
 /*
@@ -69,7 +69,7 @@
 void
 rfs4_dbe_rele_nolock(rfs4_dbe_t *entry)
 {
-	atomic_add_32(&entry->dbe_refcnt, -1);
+	atomic_dec_32(&entry->dbe_refcnt);
 }
 
 
@@ -129,7 +129,7 @@
 {
 	mutex_enter(entry->dbe_lock);
 	ASSERT(entry->dbe_refcnt > 1);
-	atomic_add_32(&entry->dbe_refcnt, -1);
+	atomic_dec_32(&entry->dbe_refcnt);
 	entry->dbe_time_rele = gethrestime_sec();
 	mutex_exit(entry->dbe_lock);
 }
--- old/usr/src/uts/common/fs/nfs/nfs4_rnode.c	2014-07-28 07:44:16.794602470 -0400
+++ new/usr/src/uts/common/fs/nfs/nfs4_rnode.c	2014-07-28 07:44:16.800665959 -0400
@@ -647,7 +647,7 @@
 		rp = kmem_cache_alloc(rnode4_cache, KM_SLEEP);
 		new_vp = vn_alloc(KM_SLEEP);
 
-		atomic_add_long((ulong_t *)&rnode4_new, 1);
+		atomic_inc_ulong((ulong_t *)&rnode4_new);
 #ifdef DEBUG
 		clstat4_debug.nrnode.value.ui64++;
 #endif
@@ -1220,7 +1220,7 @@
 	vfsp = vp->v_vfsp;
 
 	uninit_rnode4(rp);
-	atomic_add_long((ulong_t *)&rnode4_new, -1);
+	atomic_dec_ulong((ulong_t *)&rnode4_new);
 #ifdef DEBUG
 	clstat4_debug.nrnode.value.ui64--;
 #endif
--- old/usr/src/uts/common/fs/nfs/nfs4_subr.c	2014-07-28 07:44:17.022687673 -0400
+++ new/usr/src/uts/common/fs/nfs/nfs4_subr.c	2014-07-28 07:44:17.028806940 -0400
@@ -934,7 +934,7 @@
 	 * a new one and use that.
 	 */
 #ifdef DEBUG
-	atomic_add_64(&nfscl->nfscl_stat.clalloc.value.ui64, 1);
+	atomic_inc_64(&nfscl->nfscl_stat.clalloc.value.ui64);
 #endif
 	mutex_exit(&nfscl->nfscl_chtable4_lock);
 
@@ -955,7 +955,7 @@
 	if (error != 0) {
 		kmem_cache_free(chtab4_cache, cp);
 #ifdef DEBUG
-		atomic_add_64(&nfscl->nfscl_stat.clalloc.value.ui64, -1);
+		atomic_dec_64(&nfscl->nfscl_stat.clalloc.value.ui64);
 #endif
 		/*
 		 * Warning is unnecessary if error is EINTR.
@@ -977,7 +977,7 @@
 		CLNT_DESTROY(cp->ch_client);
 		kmem_cache_free(chtab4_cache, cp);
 #ifdef DEBUG
-		atomic_add_64(&nfscl->nfscl_stat.clalloc.value.ui64, -1);
+		atomic_dec_64(&nfscl->nfscl_stat.clalloc.value.ui64);
 #endif
 		return ((error != 0) ? error : EINTR);
 	}
@@ -2646,7 +2646,7 @@
 		mutex_init(&rdip->lock, NULL, MUTEX_DEFAULT, NULL);
 		rdip->count = 1;
 #ifdef DEBUG
-		atomic_add_64(&clstat4_debug.dirent.value.ui64, 1);
+		atomic_inc_64(&clstat4_debug.dirent.value.ui64);
 #endif
 	}
 	return (rc);
@@ -2703,7 +2703,7 @@
 	rddir4_cache *rc = &rdip->rc;
 
 #ifdef DEBUG
-	atomic_add_64(&clstat4_debug.dirent.value.ui64, -1);
+	atomic_dec_64(&clstat4_debug.dirent.value.ui64);
 #endif
 	if (rc->entries != NULL)
 		kmem_free(rc->entries, rc->buflen);
--- old/usr/src/uts/common/fs/nfs/nfs4_vnops.c	2014-07-28 07:44:17.293813956 -0400
+++ new/usr/src/uts/common/fs/nfs/nfs4_vnops.c	2014-07-28 07:44:17.300363230 -0400
@@ -10490,11 +10490,11 @@
 
 	if (nfs_rw_enter_sig(&rp->r_rwlock, RW_WRITER, INTR4(vp)))
 		return (EINTR);
-	atomic_add_int(&rp->r_inmap, 1);
+	atomic_inc_uint(&rp->r_inmap);
 	nfs_rw_exit(&rp->r_rwlock);
 
 	if (nfs_rw_enter_sig(&rp->r_lkserlock, RW_READER, INTR4(vp))) {
-		atomic_add_int(&rp->r_inmap, -1);
+		atomic_dec_uint(&rp->r_inmap);
 		return (EINTR);
 	}
 
@@ -10602,7 +10602,7 @@
 
 done:
 	nfs_rw_exit(&rp->r_lkserlock);
-	atomic_add_int(&rp->r_inmap, -1);
+	atomic_dec_uint(&rp->r_inmap);
 	return (error);
 }
 
--- old/usr/src/uts/common/fs/nfs/nfs_subr.c	2014-07-28 07:44:17.983881185 -0400
+++ new/usr/src/uts/common/fs/nfs/nfs_subr.c	2014-07-28 07:44:17.989864348 -0400
@@ -415,7 +415,7 @@
 	 * a new one and use that.
 	 */
 #ifdef DEBUG
-	atomic_add_64(&nfscl->nfscl_stat.clalloc.value.ui64, 1);
+	atomic_inc_64(&nfscl->nfscl_stat.clalloc.value.ui64);
 #endif
 	mutex_exit(&nfscl->nfscl_chtable_lock);
 
@@ -436,7 +436,7 @@
 	if (error != 0) {
 		kmem_cache_free(chtab_cache, cp);
 #ifdef DEBUG
-		atomic_add_64(&nfscl->nfscl_stat.clalloc.value.ui64, -1);
+		atomic_dec_64(&nfscl->nfscl_stat.clalloc.value.ui64);
 #endif
 		/*
 		 * Warning is unnecessary if error is EINTR.
@@ -455,7 +455,7 @@
 		CLNT_DESTROY(cp->ch_client);
 		kmem_cache_free(chtab_cache, cp);
 #ifdef DEBUG
-		atomic_add_64(&nfscl->nfscl_stat.clalloc.value.ui64, -1);
+		atomic_dec_64(&nfscl->nfscl_stat.clalloc.value.ui64);
 #endif
 		return ((error != 0) ? error : EINTR);
 	}
@@ -2537,7 +2537,7 @@
 		rp = kmem_cache_alloc(rnode_cache, KM_SLEEP);
 		new_vp = vn_alloc(KM_SLEEP);
 
-		atomic_add_long((ulong_t *)&rnew, 1);
+		atomic_inc_ulong((ulong_t *)&rnew);
 #ifdef DEBUG
 		clstat_debug.nrnode.value.ui64++;
 #endif
@@ -3019,7 +3019,7 @@
 	ASSERT(rp->r_mapcnt == 0);
 	ASSERT(!(rp->r_flags & RHASHED));
 	ASSERT(rp->r_freef == NULL && rp->r_freeb == NULL);
-	atomic_add_long((ulong_t *)&rnew, -1);
+	atomic_dec_ulong((ulong_t *)&rnew);
 #ifdef DEBUG
 	clstat_debug.nrnode.value.ui64--;
 #endif
@@ -3813,7 +3813,7 @@
 		mutex_init(&rc->lock, NULL, MUTEX_DEFAULT, NULL);
 		rc->count = 1;
 #ifdef DEBUG
-		atomic_add_64(&clstat_debug.dirent.value.ui64, 1);
+		atomic_inc_64(&clstat_debug.dirent.value.ui64);
 #endif
 	}
 	return (rc);
@@ -3824,7 +3824,7 @@
 {
 
 #ifdef DEBUG
-	atomic_add_64(&clstat_debug.dirent.value.ui64, -1);
+	atomic_dec_64(&clstat_debug.dirent.value.ui64);
 #endif
 	if (rc->entries != NULL) {
 #ifdef DEBUG
--- old/usr/src/uts/common/fs/nfs/nfs_vnops.c	2014-07-28 07:44:18.321384783 -0400
+++ new/usr/src/uts/common/fs/nfs/nfs_vnops.c	2014-07-28 07:44:18.327497992 -0400
@@ -4365,11 +4365,11 @@
 
 	if (nfs_rw_enter_sig(&rp->r_rwlock, RW_WRITER, INTR(vp)))
 		return (EINTR);
-	atomic_add_int(&rp->r_inmap, 1);
+	atomic_inc_uint(&rp->r_inmap);
 	nfs_rw_exit(&rp->r_rwlock);
 
 	if (nfs_rw_enter_sig(&rp->r_lkserlock, RW_READER, INTR(vp))) {
-		atomic_add_int(&rp->r_inmap, -1);
+		atomic_dec_uint(&rp->r_inmap);
 		return (EINTR);
 	}
 	if (vp->v_flag & VNOCACHE) {
@@ -4410,7 +4410,7 @@
 
 done:
 	nfs_rw_exit(&rp->r_lkserlock);
-	atomic_add_int(&rp->r_inmap, -1);
+	atomic_dec_uint(&rp->r_inmap);
 	return (error);
 }
 
--- old/usr/src/uts/common/fs/objfs/objfs_vfs.c	2014-07-28 07:44:18.650918581 -0400
+++ new/usr/src/uts/common/fs/objfs/objfs_vfs.c	2014-07-28 07:44:18.656838231 -0400
@@ -179,7 +179,7 @@
 	vfsp->vfs_fstype = objfs_fstype;
 	do {
 		dev = makedevice(objfs_major,
-		    atomic_add_32_nv(&objfs_minor, 1) & L_MAXMIN32);
+		    atomic_inc_32_nv(&objfs_minor) & L_MAXMIN32);
 	} while (vfs_devismounted(dev));
 	vfs_make_fsid(&vfsp->vfs_fsid, dev, objfs_fstype);
 	vfsp->vfs_data = data;
--- old/usr/src/uts/common/fs/proc/prvnops.c	2014-07-28 07:44:18.820374407 -0400
+++ new/usr/src/uts/common/fs/proc/prvnops.c	2014-07-28 07:44:18.826851901 -0400
@@ -4429,8 +4429,8 @@
 static	uint32_t nprnode;
 static	uint32_t nprcommon;
 
-#define	INCREMENT(x)	atomic_add_32(&x, 1);
-#define	DECREMENT(x)	atomic_add_32(&x, -1);
+#define	INCREMENT(x)	atomic_inc_32(&x);
+#define	DECREMENT(x)	atomic_dec_32(&x);
 
 #else
 
--- old/usr/src/uts/common/fs/sharefs/sharefs_vfsops.c	2014-07-28 07:44:19.192585029 -0400
+++ new/usr/src/uts/common/fs/sharefs/sharefs_vfsops.c	2014-07-28 07:44:19.198567198 -0400
@@ -201,7 +201,7 @@
 	vfsp->vfs_fstype = sharefs_fstype;
 	do {
 		dev = makedevice(sharefs_major,
-		    atomic_add_32_nv(&sharefs_minor, 1) & L_MAXMIN32);
+		    atomic_inc_32_nv(&sharefs_minor) & L_MAXMIN32);
 	} while (vfs_devismounted(dev));
 	vfs_make_fsid(&vfsp->vfs_fsid, dev, sharefs_fstype);
 	vfsp->vfs_data = data;
--- old/usr/src/uts/common/fs/sharefs/sharefs_vnops.c	2014-07-28 07:44:19.360979832 -0400
+++ new/usr/src/uts/common/fs/sharefs/sharefs_vnops.c	2014-07-28 07:44:19.367013071 -0400
@@ -24,8 +24,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <fs/fs_subr.h>
 
 #include <sys/errno.h>
@@ -253,7 +251,7 @@
 	 * No need for the lock, no other thread can be accessing
 	 * this data structure.
 	 */
-	atomic_add_32(&sft->sharefs_refs, 1);
+	atomic_inc_32(&sft->sharefs_refs);
 	sft->sharefs_real_vp = 0;
 
 	/*
@@ -285,7 +283,7 @@
 			sft->sharefs_generation = 0;
 		}
 	}
-	atomic_add_32(&sft->sharefs_refs, -1);
+	atomic_dec_32(&sft->sharefs_refs);
 	rw_exit(&sharefs_lock);
 
 	return (0);
--- old/usr/src/uts/common/fs/sharefs/sharetab.c	2014-07-28 07:44:19.534536668 -0400
+++ new/usr/src/uts/common/fs/sharefs/sharetab.c	2014-07-28 07:44:19.540968051 -0400
@@ -154,15 +154,15 @@
 			}
 
 			ASSERT(sht->s_buckets[iHash].ssh_count != 0);
-			atomic_add_32(&sht->s_buckets[iHash].ssh_count, -1);
-			atomic_add_32(&sht->s_count, -1);
-			atomic_add_32(&sharetab_count, -1);
+			atomic_dec_32(&sht->s_buckets[iHash].ssh_count);
+			atomic_dec_32(&sht->s_count);
+			atomic_dec_32(&sharetab_count);
 
 			ASSERT(sharetab_size >= s->sh_size);
 			sharetab_size -= s->sh_size;
 
 			gethrestime(&sharetab_mtime);
-			atomic_add_32(&sharetab_generation, 1);
+			atomic_inc_32(&sharetab_generation);
 
 			break;
 		}
@@ -281,7 +281,7 @@
 			sharefree(s, NULL);
 
 			gethrestime(&sharetab_mtime);
-			atomic_add_32(&sharetab_generation, 1);
+			atomic_inc_32(&sharetab_generation);
 
 			ASSERT(sht->s_buckets[iHash].ssh_count != 0);
 			rw_exit(&sharetab_lock);
@@ -298,13 +298,13 @@
 	 */
 	sh->sh_next = sht->s_buckets[iHash].ssh_sh;
 	sht->s_buckets[iHash].ssh_sh = sh;
-	atomic_add_32(&sht->s_buckets[iHash].ssh_count, 1);
-	atomic_add_32(&sht->s_count, 1);
-	atomic_add_32(&sharetab_count, 1);
+	atomic_inc_32(&sht->s_buckets[iHash].ssh_count);
+	atomic_inc_32(&sht->s_count);
+	atomic_inc_32(&sharetab_count);
 	sharetab_size += sh->sh_size;
 
 	gethrestime(&sharetab_mtime);
-	atomic_add_32(&sharetab_generation, 1);
+	atomic_inc_32(&sharetab_generation);
 
 	rw_exit(&sharetab_lock);
 
--- old/usr/src/uts/common/fs/smbclnt/smbfs/smbfs_subr2.c	2014-07-28 07:44:19.710528763 -0400
+++ new/usr/src/uts/common/fs/smbclnt/smbfs/smbfs_subr2.c	2014-07-28 07:44:19.716559820 -0400
@@ -403,7 +403,7 @@
 		np = kmem_cache_alloc(smbnode_cache, KM_SLEEP);
 		new_vp = vn_alloc(KM_SLEEP);
 
-		atomic_add_long((ulong_t *)&smbnodenew, 1);
+		atomic_inc_ulong((ulong_t *)&smbnodenew);
 		vp = new_vp;
 	}
 
@@ -1027,7 +1027,7 @@
 	ASSERT(np->n_rpath == NULL);
 	ASSERT(!(np->r_flags & RHASHED));
 	ASSERT(np->r_freef == NULL && np->r_freeb == NULL);
-	atomic_add_long((ulong_t *)&smbnodenew, -1);
+	atomic_dec_ulong((ulong_t *)&smbnodenew);
 	vn_invalid(vp);
 	vn_free(vp);
 	kmem_cache_free(smbnode_cache, np);
--- old/usr/src/uts/common/fs/sockfs/nl7curi.c	2014-07-28 07:44:19.909828905 -0400
+++ new/usr/src/uts/common/fs/sockfs/nl7curi.c	2014-07-28 07:44:19.915915721 -0400
@@ -274,8 +274,8 @@
 	mutex_enter(&(hp)->lock);					\
 	while ((_nuri = (hp)->list) != NULL) {				\
 		(hp)->list = _nuri->hash;				\
-		atomic_add_32(&uri_hash_cnt[(from)], -1);		\
-		atomic_add_32(&uri_hash_cnt[(to)], 1);			\
+		atomic_dec_32(&uri_hash_cnt[(from)]);		\
+		atomic_inc_32(&uri_hash_cnt[(to)]);			\
 		_nhix = _nuri->hvalue;					\
 		URI_HASH_IX(_nhix, to);					\
 		_nhp = &uri_hash_ab[(to)][_nhix];			\
@@ -294,7 +294,7 @@
 	} else {							\
 		(hp)->list = (uri)->hash;				\
 	}								\
-	if (atomic_add_32_nv(&uri_hash_cnt[(cur)], -1) == 0 &&		\
+	if (atomic_dec_32_nv(&uri_hash_cnt[(cur)]) == 0 &&		\
 	    uri_hash_ab[(new)] != NULL) {				\
 		kmem_free(uri_hash_ab[cur],				\
 		    sizeof (uri_hash_t) * uri_hash_sz[cur]);		\
@@ -597,7 +597,7 @@
 		 * as the check is only advisory.
 		 */
 	fast:
-		atomic_add_32(&uri_hash_cnt[cur], 1);
+		atomic_inc_32(&uri_hash_cnt[cur]);
 		hp = &uri_hash_ab[cur][hix];
 		mutex_enter(&hp->lock);
 		uri->hash = hp->list;
@@ -689,7 +689,7 @@
 	 * completely migrated then walk all current hash chains and
 	 * migrate list members now.
 	 */
-	if (atomic_add_32_nv(&uri_hash_cnt[new], 1) >= uri_hash_overflow[new]) {
+	if (atomic_inc_32_nv(&uri_hash_cnt[new]) >= uri_hash_overflow[new]) {
 		for (hix = 0; hix < uri_hash_sz[cur]; hix++) {
 			hp = &uri_hash_ab[cur][hix];
 			if (hp->list != NULL) {
@@ -837,7 +837,7 @@
 				hp->list = uri->hash;
 			}
 			mutex_exit(&hp->lock);
-			atomic_add_32(&uri_hash_cnt[cur], -1);
+			atomic_dec_32(&uri_hash_cnt[cur]);
 			rw_exit(&uri_hash_access);
 			if (ruri->nocache)
 				nl7c_uri_purge++;
--- old/usr/src/uts/common/fs/sockfs/nl7curi.h	2014-07-28 07:44:20.146853194 -0400
+++ new/usr/src/uts/common/fs/sockfs/nl7curi.h	2014-07-28 07:44:20.152794573 -0400
@@ -27,8 +27,6 @@
 #ifndef _SYS_SOCKFS_NL7CURI_H
 #define	_SYS_SOCKFS_NL7CURI_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifdef	__cplusplus
 extern "C" {
 #endif
@@ -83,12 +81,12 @@
 }
 
 #define	REF_HOLD(container) {						\
-	atomic_add_32(&(container)->ref.cnt, 1);			\
+	atomic_inc_32(&(container)->ref.cnt);			\
 	ASSERT((container)->ref.cnt != 0);				\
 }
 
 #define	REF_RELE(container) {						\
-	if (atomic_add_32_nv(&(container)->ref.cnt, -1) == 0) {		\
+	if (atomic_dec_32_nv(&(container)->ref.cnt) == 0) {		\
 		(container)->ref.last((container));			\
 		kmem_cache_free((container)->ref.kmc, (container));	\
 	}								\
--- old/usr/src/uts/common/fs/sockfs/sockfilter_impl.h	2014-07-28 07:44:20.314228050 -0400
+++ new/usr/src/uts/common/fs/sockfs/sockfilter_impl.h	2014-07-28 07:44:20.320550043 -0400
@@ -63,7 +63,7 @@
 };
 
 #define	SOF_GLOBAL_STAT_BUMP(s) \
-	atomic_add_64(&sof_stat.sofks_##s.value.ui64, 1)
+	atomic_inc_64(&sof_stat.sofks_##s.value.ui64)
 
 /*
  * Per filter statistics.
--- old/usr/src/uts/common/fs/sockfs/socksyscalls.c	2014-07-28 07:44:20.482577934 -0400
+++ new/usr/src/uts/common/fs/sockfs/socksyscalls.c	2014-07-28 07:44:20.488776954 -0400
@@ -2402,7 +2402,7 @@
 snf_vmap_desbfree(snf_vmap_desbinfo *snfv)
 {
 	ASSERT(snfv->snfv_ref != 0);
-	if (atomic_add_32_nv(&snfv->snfv_ref, -1) == 0) {
+	if (atomic_dec_32_nv(&snfv->snfv_ref) == 0) {
 		vpm_unmap_pages(snfv->snfv_vml, S_READ);
 		VN_RELE(snfv->snfv_vp);
 		kmem_free(snfv, sizeof (snf_vmap_desbinfo));
--- old/usr/src/uts/common/fs/ufs/lufs.c	2014-07-28 07:44:20.742594804 -0400
+++ new/usr/src/uts/common/fs/ufs/lufs.c	2014-07-28 07:44:20.748572777 -0400
@@ -920,7 +920,7 @@
 	vfs_lock_wait(ufsvfsp->vfs_vfs);
 	ulp = &ufsvfsp->vfs_ulockfs;
 	mutex_enter(&ulp->ul_lock);
-	atomic_add_long(&ufs_quiesce_pend, 1);
+	atomic_inc_ulong(&ufs_quiesce_pend);
 	(void) ufs_quiesce(ulp);
 
 	(void) ufs_flush(ufsvfsp->vfs_vfs);
@@ -939,7 +939,7 @@
 	(void) lufs_unsnarf(ufsvfsp);
 	mutex_exit(&ufs_scan_lock);
 
-	atomic_add_long(&ufs_quiesce_pend, -1);
+	atomic_dec_ulong(&ufs_quiesce_pend);
 	mutex_exit(&ulp->ul_lock);
 	vfs_setmntopt(ufsvfsp->vfs_vfs, MNTOPT_NOLOGGING, NULL, 0);
 	vfs_unlock(ufsvfsp->vfs_vfs);
--- old/usr/src/uts/common/fs/ufs/ufs_directio.c	2014-07-28 07:44:20.953092582 -0400
+++ new/usr/src/uts/common/fs/ufs/ufs_directio.c	2014-07-28 07:44:20.959001796 -0400
@@ -614,7 +614,7 @@
 
 	if (!exclusive) {
 		ufs_shared_writes++;
-		ncur = atomic_add_32_nv(&ufs_cur_writes, 1);
+		ncur = atomic_inc_32_nv(&ufs_cur_writes);
 		if (ncur > ufs_maxcur_writes)
 			ufs_maxcur_writes = ncur;
 	}
@@ -727,7 +727,7 @@
 	}
 
 	if (!exclusive) {
-		atomic_add_32(&ufs_cur_writes, -1);
+		atomic_dec_32(&ufs_cur_writes);
 		/*
 		 * If this write was done shared, readers may
 		 * have pulled in unmodified pages. Get rid of
--- old/usr/src/uts/common/fs/ufs/ufs_filio.c	2014-07-28 07:44:21.147671263 -0400
+++ new/usr/src/uts/common/fs/ufs/ufs_filio.c	2014-07-28 07:44:21.153753846 -0400
@@ -344,7 +344,7 @@
 	/* hold the mutex to prevent race with a lockfs request */
 	vfs_lock_wait(vp->v_vfsp);
 	mutex_enter(&ulp->ul_lock);
-	atomic_add_long(&ufs_quiesce_pend, 1);
+	atomic_inc_ulong(&ufs_quiesce_pend);
 
 	if (ULOCKFS_IS_HLOCK(ulp)) {
 		error = EIO;
@@ -388,7 +388,7 @@
 	/*
 	 * we need this broadcast because of the ufs_quiesce call above
 	 */
-	atomic_add_long(&ufs_quiesce_pend, -1);
+	atomic_dec_ulong(&ufs_quiesce_pend);
 	cv_broadcast(&ulp->ul_cv);
 	mutex_exit(&ulp->ul_lock);
 	vfs_unlock(vp->v_vfsp);
@@ -425,7 +425,7 @@
 
 	/* hold the mutex to prevent race with a lockfs request */
 	mutex_enter(&ulp->ul_lock);
-	atomic_add_long(&ufs_quiesce_pend, 1);
+	atomic_inc_ulong(&ufs_quiesce_pend);
 
 	if (ULOCKFS_IS_HLOCK(ulp)) {
 		error = EIO;
@@ -486,7 +486,7 @@
 	error = ufs_flush(vp->v_vfsp);
 
 out:
-	atomic_add_long(&ufs_quiesce_pend, -1);
+	atomic_dec_ulong(&ufs_quiesce_pend);
 	cv_broadcast(&ulp->ul_cv);
 	mutex_exit(&ulp->ul_lock);
 	vfs_unlock(vp->v_vfsp);
--- old/usr/src/uts/common/fs/ufs/ufs_lockfs.c	2014-07-28 07:44:21.329133831 -0400
+++ new/usr/src/uts/common/fs/ufs/ufs_lockfs.c	2014-07-28 07:44:21.335135575 -0400
@@ -933,7 +933,7 @@
 	ufs_thread_suspend(&ufsvfsp->vfs_delete);
 
 	mutex_enter(&ulp->ul_lock);
-	atomic_add_long(&ufs_quiesce_pend, 1);
+	atomic_inc_ulong(&ufs_quiesce_pend);
 
 	/*
 	 * Quit if there is another lockfs request in progress
@@ -1163,7 +1163,7 @@
 		    ulp->ul_lockfs.lf_comment && ulp->ul_lockfs.lf_comlen > 0 ?
 		    ulp->ul_lockfs.lf_comment: "user-applied error lock");
 
-	atomic_add_long(&ufs_quiesce_pend, -1);
+	atomic_dec_ulong(&ufs_quiesce_pend);
 	mutex_exit(&ulp->ul_lock);
 	vfs_unlock(vfsp);
 
@@ -1202,7 +1202,7 @@
 	LOCKFS_CLR_BUSY(&ulp->ul_lockfs);
 
 errexit:
-	atomic_add_long(&ufs_quiesce_pend, -1);
+	atomic_dec_ulong(&ufs_quiesce_pend);
 	mutex_exit(&ulp->ul_lock);
 	vfs_unlock(vfsp);
 
@@ -1299,10 +1299,10 @@
 	}
 
 	if (mask & ULOCKFS_FWLOCK) {
-		atomic_add_long(&ulp->ul_falloc_cnt, 1);
+		atomic_inc_ulong(&ulp->ul_falloc_cnt);
 		ULOCKFS_SET_FALLOC(ulp);
 	} else {
-		atomic_add_long(&ulp->ul_vnops_cnt, 1);
+		atomic_inc_ulong(&ulp->ul_vnops_cnt);
 	}
 
 	return (0);
@@ -1380,7 +1380,7 @@
 	ctr = (mask & ULOCKFS_FWLOCK) ?
 	    &ulp->ul_falloc_cnt : &ulp->ul_vnops_cnt;
 	if (!ULOCKFS_IS_SLOCK(ulp)) {
-		atomic_add_long(ctr, 1);
+		atomic_inc_ulong(ctr);
 		op_cnt_incremented++;
 	}
 
@@ -1399,7 +1399,7 @@
 	 */
 	if (!ULOCKFS_IS_JUSTULOCK(ulp) || ufs_quiesce_pend) {
 		if (op_cnt_incremented)
-			if (!atomic_add_long_nv(ctr, -1))
+			if (!atomic_dec_ulong_nv(ctr))
 				cv_broadcast(&ulp->ul_cv);
 		mutex_enter(&ulp->ul_lock);
 		error = ufs_check_lockfs(ufsvfsp, ulp, mask);
@@ -1514,14 +1514,14 @@
 	if (ULOCKFS_IS_FALLOC(ulp) && info->flags & ULOCK_INFO_FALLOCATE) {
 		/* Clear the thread's fallocate state */
 		info->flags &= ~ULOCK_INFO_FALLOCATE;
-		if (!atomic_add_long_nv(&ulp->ul_falloc_cnt, -1)) {
+		if (!atomic_dec_ulong_nv(&ulp->ul_falloc_cnt)) {
 			mutex_enter(&ulp->ul_lock);
 			ULOCKFS_CLR_FALLOC(ulp);
 			cv_broadcast(&ulp->ul_cv);
 			mutex_exit(&ulp->ul_lock);
 		}
 	} else  { /* normal thread */
-		if (!atomic_add_long_nv(&ulp->ul_vnops_cnt, -1))
+		if (!atomic_dec_ulong_nv(&ulp->ul_vnops_cnt))
 			cv_broadcast(&ulp->ul_cv);
 	}
 }
@@ -1587,7 +1587,7 @@
 	ctr = (mask & ULOCKFS_FWLOCK) ?
 	    &ulp->ul_falloc_cnt : &ulp->ul_vnops_cnt;
 	if (!ULOCKFS_IS_SLOCK(ulp)) {
-		atomic_add_long(ctr, 1);
+		atomic_inc_ulong(ctr);
 		op_cnt_incremented++;
 	}
 
@@ -1601,7 +1601,7 @@
 		 * file system is delete locked, a mmap can still go through).
 		 */
 		if (op_cnt_incremented)
-			if (!atomic_add_long_nv(ctr, -1))
+			if (!atomic_dec_ulong_nv(ctr))
 				cv_broadcast(&ulp->ul_cv);
 		mutex_enter(&ulp->ul_lock);
 		if (ULOCKFS_IS_HLOCK(ulp) ||
@@ -1617,7 +1617,7 @@
 				    sizeof (ulockfs_info_t));
 			return (error);
 		}
-		atomic_add_long(ctr, 1);
+		atomic_inc_ulong(ctr);
 		if (mask & ULOCKFS_FWLOCK)
 			ULOCKFS_SET_FALLOC(ulp);
 		mutex_exit(&ulp->ul_lock);
@@ -1648,7 +1648,7 @@
 					    sizeof (ulockfs_info_t));
 				return (error);
 			}
-			atomic_add_long(ctr, 1);
+			atomic_inc_ulong(ctr);
 			if (mask & ULOCKFS_FWLOCK)
 				ULOCKFS_SET_FALLOC(ulp);
 			mutex_exit(&ulp->ul_lock);
@@ -1730,9 +1730,9 @@
 	/*
 	 * First time VOP call
 	 */
-	atomic_add_long(&ulp->ul_vnops_cnt, 1);
+	atomic_inc_ulong(&ulp->ul_vnops_cnt);
 	if (!ULOCKFS_IS_JUSTULOCK(ulp) || ufs_quiesce_pend) {
-		if (!atomic_add_long_nv(&ulp->ul_vnops_cnt, -1))
+		if (!atomic_dec_ulong_nv(&ulp->ul_vnops_cnt))
 			cv_broadcast(&ulp->ul_cv);
 		mutex_enter(&ulp->ul_lock);
 		if (seg->s_ops == &segvn_ops &&
--- old/usr/src/uts/common/fs/ufs/ufs_vfsops.c	2014-07-28 07:44:21.554198244 -0400
+++ new/usr/src/uts/common/fs/ufs/ufs_vfsops.c	2014-07-28 07:44:21.560252680 -0400
@@ -599,7 +599,7 @@
 	 * synchronize w/ufs ioctls
 	 */
 	mutex_enter(&ulp->ul_lock);
-	atomic_add_long(&ufs_quiesce_pend, 1);
+	atomic_inc_ulong(&ufs_quiesce_pend);
 
 	/*
 	 * reset options
@@ -745,7 +745,7 @@
 	fsp->fs_fmod = 0;
 	fsp->fs_ronly = 0;
 
-	atomic_add_long(&ufs_quiesce_pend, -1);
+	atomic_dec_ulong(&ufs_quiesce_pend);
 	cv_broadcast(&ulp->ul_cv);
 	mutex_exit(&ulp->ul_lock);
 
@@ -774,7 +774,7 @@
 remounterr:
 	if (tpt)
 		brelse(tpt);
-	atomic_add_long(&ufs_quiesce_pend, -1);
+	atomic_dec_ulong(&ufs_quiesce_pend);
 	cv_broadcast(&ulp->ul_cv);
 	mutex_exit(&ulp->ul_lock);
 	return (error);
@@ -1421,7 +1421,7 @@
 		 * hard lock it before unmounting.
 		 */
 		if (!ULOCKFS_IS_HLOCK(ulp)) {
-			atomic_add_long(&ufs_quiesce_pend, 1);
+			atomic_inc_ulong(&ufs_quiesce_pend);
 			lockfs.lf_lock = LOCKFS_HLOCK;
 			lockfs.lf_flags = 0;
 			lockfs.lf_key = ulp->ul_lockfs.lf_key + 1;
@@ -1433,7 +1433,7 @@
 			(void) ufs_quiesce(ulp);
 			(void) ufs_flush(vfsp);
 			(void) ufs_thaw(vfsp, ufsvfsp, ulp);
-			atomic_add_long(&ufs_quiesce_pend, -1);
+			atomic_dec_ulong(&ufs_quiesce_pend);
 			ULOCKFS_CLR_BUSY(ulp);
 			LOCKFS_CLR_BUSY(&ulp->ul_lockfs);
 			poll_events |= POLLERR;
@@ -2153,7 +2153,7 @@
 	ulp = &ufsvfsp->vfs_ulockfs;
 
 	mutex_enter(&ulp->ul_lock);
-	atomic_add_long(&ufs_quiesce_pend, 1);
+	atomic_inc_ulong(&ufs_quiesce_pend);
 
 	(void) ufs_quiesce(ulp);
 	(void) ufs_flush(vfsp);
@@ -2278,7 +2278,7 @@
 	rootdev = new_rootdev;
 	rootvp = new_rootvp;
 
-	atomic_add_long(&ufs_quiesce_pend, -1);
+	atomic_dec_ulong(&ufs_quiesce_pend);
 	cv_broadcast(&ulp->ul_cv);
 	mutex_exit(&ulp->ul_lock);
 
--- old/usr/src/uts/common/fs/ufs/ufs_vnops.c	2014-07-28 07:44:21.798267087 -0400
+++ new/usr/src/uts/common/fs/ufs/ufs_vnops.c	2014-07-28 07:44:21.804464769 -0400
@@ -5976,11 +5976,11 @@
 			}
 			return (vmpss ? EIO : EINVAL);
 		}
-		atomic_add_long(&ulp->ul_vnops_cnt, 1);
+		atomic_inc_ulong(&ulp->ul_vnops_cnt);
 		if (pp == NULL)
 			mutex_exit(&ulp->ul_lock);
 		if (ufs_quiesce_pend) {
-			if (!atomic_add_long_nv(&ulp->ul_vnops_cnt, -1))
+			if (!atomic_dec_ulong_nv(&ulp->ul_vnops_cnt))
 				cv_broadcast(&ulp->ul_cv);
 			return (vmpss ? EIO : EINVAL);
 		}
@@ -5999,7 +5999,7 @@
 		if (!vmpss) {
 			rw_enter(&ip->i_contents, RW_READER);
 		} else if (!rw_tryenter(&ip->i_contents, RW_READER)) {
-			if (!atomic_add_long_nv(&ulp->ul_vnops_cnt, -1))
+			if (!atomic_dec_ulong_nv(&ulp->ul_vnops_cnt))
 				cv_broadcast(&ulp->ul_cv);
 			return (EDEADLK);
 		}
@@ -6012,7 +6012,7 @@
 	if (vmpss && btopr(io_off + io_len) > btopr(ip->i_size)) {
 		if (dolock)
 			rw_exit(&ip->i_contents);
-		if (!atomic_add_long_nv(&ulp->ul_vnops_cnt, -1))
+		if (!atomic_dec_ulong_nv(&ulp->ul_vnops_cnt))
 			cv_broadcast(&ulp->ul_cv);
 		return (EFAULT);
 	}
@@ -6025,7 +6025,7 @@
 		}
 		if (dolock)
 			rw_exit(&ip->i_contents);
-		if (!atomic_add_long_nv(&ulp->ul_vnops_cnt, -1))
+		if (!atomic_dec_ulong_nv(&ulp->ul_vnops_cnt))
 			cv_broadcast(&ulp->ul_cv);
 		return (err);
 	}
@@ -6132,7 +6132,7 @@
 
 	if (dolock)
 		rw_exit(&ip->i_contents);
-	if (vmpss && !atomic_add_long_nv(&ulp->ul_vnops_cnt, -1))
+	if (vmpss && !atomic_dec_ulong_nv(&ulp->ul_vnops_cnt))
 		cv_broadcast(&ulp->ul_cv);
 	return (err);
 }
--- old/usr/src/uts/common/fs/vfs.c	2014-07-28 07:44:22.179671324 -0400
+++ new/usr/src/uts/common/fs/vfs.c	2014-07-28 07:44:22.185621391 -0400
@@ -4331,7 +4331,7 @@
 void
 vfs_hold(vfs_t *vfsp)
 {
-	atomic_add_32(&vfsp->vfs_count, 1);
+	atomic_inc_32(&vfsp->vfs_count);
 	ASSERT(vfsp->vfs_count != 0);
 }
 
@@ -4344,7 +4344,7 @@
 vfs_rele(vfs_t *vfsp)
 {
 	ASSERT(vfsp->vfs_count != 0);
-	if (atomic_add_32_nv(&vfsp->vfs_count, -1) == 0) {
+	if (atomic_dec_32_nv(&vfsp->vfs_count) == 0) {
 		VFS_FREEVFS(vfsp);
 		lofi_remove(vfsp);
 		if (vfsp->vfs_zone)
--- old/usr/src/uts/common/fs/vnode.c	2014-07-28 07:44:22.492835496 -0400
+++ new/usr/src/uts/common/fs/vnode.c	2014-07-28 07:44:22.498949862 -0400
@@ -1244,9 +1244,9 @@
 	ASSERT(vp->v_type == VREG);
 
 	if (filemode & FREAD)
-		atomic_add_32(&(vp->v_rdcnt), 1);
+		atomic_inc_32(&vp->v_rdcnt);
 	if (filemode & FWRITE)
-		atomic_add_32(&(vp->v_wrcnt), 1);
+		atomic_inc_32(&vp->v_wrcnt);
 
 }
 
@@ -1259,11 +1259,11 @@
 
 	if (filemode & FREAD) {
 		ASSERT(vp->v_rdcnt > 0);
-		atomic_add_32(&(vp->v_rdcnt), -1);
+		atomic_dec_32(&vp->v_rdcnt);
 	}
 	if (filemode & FWRITE) {
 		ASSERT(vp->v_wrcnt > 0);
-		atomic_add_32(&(vp->v_wrcnt), -1);
+		atomic_dec_32(&vp->v_wrcnt);
 	}
 
 }
@@ -2918,7 +2918,7 @@
 {
 	static uint64_t next_caller_id = 0LL; /* First call returns 1 */
 
-	return ((u_longlong_t)atomic_add_64_nv(&next_caller_id, 1));
+	return ((u_longlong_t)atomic_inc_64_nv(&next_caller_id));
 }
 
 /*
@@ -3146,9 +3146,9 @@
 	 */
 	if ((*vpp)->v_type == VREG) {
 		if (mode & FREAD)
-			atomic_add_32(&((*vpp)->v_rdcnt), 1);
+			atomic_inc_32(&(*vpp)->v_rdcnt);
 		if (mode & FWRITE)
-			atomic_add_32(&((*vpp)->v_wrcnt), 1);
+			atomic_inc_32(&(*vpp)->v_wrcnt);
 	}
 
 	VOPXID_MAP_CR(vp, cr);
@@ -3162,9 +3162,9 @@
 		 */
 		VOPSTATS_UPDATE(vp, open);
 		if ((vp->v_type == VREG) && (mode & FREAD))
-			atomic_add_32(&(vp->v_rdcnt), -1);
+			atomic_dec_32(&vp->v_rdcnt);
 		if ((vp->v_type == VREG) && (mode & FWRITE))
-			atomic_add_32(&(vp->v_wrcnt), -1);
+			atomic_dec_32(&vp->v_wrcnt);
 	} else {
 		/*
 		 * Some filesystems will return a different vnode,
@@ -3178,13 +3178,13 @@
 		if (*vpp != vp && *vpp != NULL) {
 			vn_copypath(vp, *vpp);
 			if (((*vpp)->v_type == VREG) && (mode & FREAD))
-				atomic_add_32(&((*vpp)->v_rdcnt), 1);
+				atomic_inc_32(&(*vpp)->v_rdcnt);
 			if ((vp->v_type == VREG) && (mode & FREAD))
-				atomic_add_32(&(vp->v_rdcnt), -1);
+				atomic_dec_32(&vp->v_rdcnt);
 			if (((*vpp)->v_type == VREG) && (mode & FWRITE))
-				atomic_add_32(&((*vpp)->v_wrcnt), 1);
+				atomic_inc_32(&(*vpp)->v_wrcnt);
 			if ((vp->v_type == VREG) && (mode & FWRITE))
-				atomic_add_32(&(vp->v_wrcnt), -1);
+				atomic_dec_32(&vp->v_wrcnt);
 		}
 	}
 	VN_RELE(vp);
@@ -3213,11 +3213,11 @@
 	if ((vp->v_type == VREG) && (count == 1))  {
 		if (flag & FREAD) {
 			ASSERT(vp->v_rdcnt > 0);
-			atomic_add_32(&(vp->v_rdcnt), -1);
+			atomic_dec_32(&vp->v_rdcnt);
 		}
 		if (flag & FWRITE) {
 			ASSERT(vp->v_wrcnt > 0);
-			atomic_add_32(&(vp->v_wrcnt), -1);
+			atomic_dec_32(&vp->v_wrcnt);
 		}
 	}
 	return (err);
--- old/usr/src/uts/common/fs/zfs/dbuf.c	2014-07-28 07:44:22.803910322 -0400
+++ new/usr/src/uts/common/fs/zfs/dbuf.c	2014-07-28 07:44:22.809952778 -0400
@@ -175,7 +175,7 @@
 	db->db_hash_next = h->hash_table[idx];
 	h->hash_table[idx] = db;
 	mutex_exit(DBUF_HASH_MUTEX(h, idx));
-	atomic_add_64(&dbuf_hash_count, 1);
+	atomic_inc_64(&dbuf_hash_count);
 
 	return (NULL);
 }
@@ -210,7 +210,7 @@
 	*dbp = db->db_hash_next;
 	db->db_hash_next = NULL;
 	mutex_exit(DBUF_HASH_MUTEX(h, idx));
-	atomic_add_64(&dbuf_hash_count, -1);
+	atomic_dec_64(&dbuf_hash_count);
 }
 
 static arc_evict_func_t dbuf_do_evict;
--- old/usr/src/uts/common/fs/zfs/spa.c	2014-07-28 07:44:23.072489264 -0400
+++ new/usr/src/uts/common/fs/zfs/spa.c	2014-07-28 07:44:23.078698880 -0400
@@ -1823,9 +1823,9 @@
 	if (error) {
 		if ((BP_GET_LEVEL(bp) != 0 || DMU_OT_IS_METADATA(type)) &&
 		    type != DMU_OT_INTENT_LOG)
-			atomic_add_64(&sle->sle_meta_count, 1);
+			atomic_inc_64(&sle->sle_meta_count);
 		else
-			atomic_add_64(&sle->sle_data_count, 1);
+			atomic_inc_64(&sle->sle_data_count);
 	}
 	zio_data_buf_free(zio->io_data, zio->io_size);
 
--- old/usr/src/uts/common/fs/zfs/sys/refcount.h	2014-07-28 07:44:23.460772769 -0400
+++ new/usr/src/uts/common/fs/zfs/sys/refcount.h	2014-07-28 07:44:23.466744074 -0400
@@ -87,8 +87,8 @@
 #define	refcount_destroy_many(rc, number) ((rc)->rc_count = 0)
 #define	refcount_is_zero(rc) ((rc)->rc_count == 0)
 #define	refcount_count(rc) ((rc)->rc_count)
-#define	refcount_add(rc, holder) atomic_add_64_nv(&(rc)->rc_count, 1)
-#define	refcount_remove(rc, holder) atomic_add_64_nv(&(rc)->rc_count, -1)
+#define	refcount_add(rc, holder) atomic_inc_64_nv(&(rc)->rc_count)
+#define	refcount_remove(rc, holder) atomic_dec_64_nv(&(rc)->rc_count)
 #define	refcount_add_many(rc, number, holder) \
 	atomic_add_64_nv(&(rc)->rc_count, number)
 #define	refcount_remove_many(rc, number, holder) \
--- old/usr/src/uts/common/fs/zfs/vdev_cache.c	2014-07-28 07:44:23.626436048 -0400
+++ new/usr/src/uts/common/fs/zfs/vdev_cache.c	2014-07-28 07:44:23.632570131 -0400
@@ -102,7 +102,7 @@
 	{ "misses",		KSTAT_DATA_UINT64 }
 };
 
-#define	VDCSTAT_BUMP(stat)	atomic_add_64(&vdc_stats.stat.value.ui64, 1);
+#define	VDCSTAT_BUMP(stat)	atomic_inc_64(&vdc_stats.stat.value.ui64);
 
 static int
 vdev_cache_offset_compare(const void *a1, const void *a2)
--- old/usr/src/uts/common/fs/zfs/vdev_label.c	2014-07-28 07:44:23.801256254 -0400
+++ new/usr/src/uts/common/fs/zfs/vdev_label.c	2014-07-28 07:44:23.807402647 -0400
@@ -976,7 +976,7 @@
 	uint64_t *good_writes = zio->io_private;
 
 	if (zio->io_error == 0 && zio->io_vd->vdev_top->vdev_ms_array != 0)
-		atomic_add_64(good_writes, 1);
+		atomic_inc_64(good_writes);
 }
 
 /*
@@ -1051,7 +1051,7 @@
 	uint64_t *good_writes = zio->io_private;
 
 	if (zio->io_error == 0)
-		atomic_add_64(good_writes, 1);
+		atomic_inc_64(good_writes);
 }
 
 /*
--- old/usr/src/uts/common/fs/zfs/zfs_vfsops.c	2014-07-28 07:44:24.003212625 -0400
+++ new/usr/src/uts/common/fs/zfs/zfs_vfsops.c	2014-07-28 07:44:24.009231972 -0400
@@ -1240,7 +1240,7 @@
 		dmu_objset_disown(zfsvfs->z_os, zfsvfs);
 		zfsvfs_free(zfsvfs);
 	} else {
-		atomic_add_32(&zfs_active_fs_count, 1);
+		atomic_inc_32(&zfs_active_fs_count);
 	}
 
 	return (error);
@@ -2158,7 +2158,7 @@
 
 	zfsvfs_free(zfsvfs);
 
-	atomic_add_32(&zfs_active_fs_count, -1);
+	atomic_dec_32(&zfs_active_fs_count);
 }
 
 /*
--- old/usr/src/uts/common/fs/zfs/zio_inject.c	2014-07-28 07:44:24.252565762 -0400
+++ new/usr/src/uts/common/fs/zfs/zio_inject.c	2014-07-28 07:44:24.258380392 -0400
@@ -426,7 +426,7 @@
 		handler->zi_spa = spa;
 		handler->zi_record = *record;
 		list_insert_tail(&inject_handlers, handler);
-		atomic_add_32(&zio_injection_enabled, 1);
+		atomic_inc_32(&zio_injection_enabled);
 
 		rw_exit(&inject_lock);
 	}
@@ -503,7 +503,7 @@
 
 	spa_inject_delref(handler->zi_spa);
 	kmem_free(handler, sizeof (inject_handler_t));
-	atomic_add_32(&zio_injection_enabled, -1);
+	atomic_dec_32(&zio_injection_enabled);
 
 	return (0);
 }
--- old/usr/src/uts/common/inet/ilb/ilb.c	2014-07-28 07:44:24.428517636 -0400
+++ new/usr/src/uts/common/inet/ilb/ilb.c	2014-07-28 07:44:24.434527120 -0400
@@ -638,7 +638,7 @@
 	/* ir_name is all 0 to begin with */
 	(void) memcpy(rule->ir_name, cmd->name, ILB_RULE_NAMESZ - 1);
 
-	rule->ir_ks_instance = atomic_add_int_nv(&ilb_kstat_instance, 1);
+	rule->ir_ks_instance = atomic_inc_uint_nv(&ilb_kstat_instance);
 	stackid = (netstackid_t)(uintptr_t)ilbs->ilbs_ksp->ks_private;
 	if ((rule->ir_ksp = ilb_rule_kstat_init(stackid, rule)) == NULL) {
 		ret = ENOMEM;
--- old/usr/src/uts/common/inet/ilb/ilb_nat.c	2014-07-28 07:44:24.663964350 -0400
+++ new/usr/src/uts/common/inet/ilb/ilb_nat.c	2014-07-28 07:44:24.669864573 -0400
@@ -236,7 +236,7 @@
 	tmp->nse_refcnt = 1;
 
 	(void) snprintf(arena_name, ARENA_NAMESZ, "ilb_ns_%u",
-	    atomic_add_32_nv(&ilb_nat_src_instance, 1));
+	    atomic_inc_32_nv(&ilb_nat_src_instance));
 	if ((tmp->nse_port_arena = vmem_create(arena_name,
 	    (void *)NAT_PORT_START, NAT_PORT_SIZE, 1, NULL, NULL, NULL, 1,
 	    VM_SLEEP | VMC_IDENTIFIER)) == NULL) {
--- old/usr/src/uts/common/inet/ip.h	2014-07-28 07:44:24.846483207 -0400
+++ new/usr/src/uts/common/inet/ip.h	2014-07-28 07:44:24.852602692 -0400
@@ -720,14 +720,14 @@
 } ipsec_latch_t;
 
 #define	IPLATCH_REFHOLD(ipl) { \
-	atomic_add_32(&(ipl)->ipl_refcnt, 1);		\
+	atomic_inc_32(&(ipl)->ipl_refcnt);		\
 	ASSERT((ipl)->ipl_refcnt != 0);			\
 }
 
 #define	IPLATCH_REFRELE(ipl) {				\
 	ASSERT((ipl)->ipl_refcnt != 0);				\
 	membar_exit();						\
-	if (atomic_add_32_nv(&(ipl)->ipl_refcnt, -1) == 0)	\
+	if (atomic_dec_32_nv(&(ipl)->ipl_refcnt) == 0)	\
 		iplatch_free(ipl);				\
 }
 
--- old/usr/src/uts/common/inet/ip/igmp.c	2014-07-28 07:44:25.150503943 -0400
+++ new/usr/src/uts/common/inet/ip/igmp.c	2014-07-28 07:44:25.156593319 -0400
@@ -508,7 +508,7 @@
 		if (ill->ill_mcast_type != IGMP_V1_ROUTER) {
 			ip1dbg(("Received IGMPv1 Query on %s, switching mode "
 			    "to IGMP_V1_ROUTER\n", ill->ill_name));
-			atomic_add_16(&ill->ill_ifptr->illif_mcast_v1, 1);
+			atomic_inc_16(&ill->ill_ifptr->illif_mcast_v1);
 			ill->ill_mcast_type = IGMP_V1_ROUTER;
 		}
 
@@ -545,7 +545,7 @@
 		if (ill->ill_mcast_type == IGMP_V3_ROUTER) {
 			ip1dbg(("Received IGMPv2 Query on %s, switching mode "
 			    "to IGMP_V2_ROUTER", ill->ill_name));
-			atomic_add_16(&ill->ill_ifptr->illif_mcast_v2, 1);
+			atomic_inc_16(&ill->ill_ifptr->illif_mcast_v2);
 			ill->ill_mcast_type = IGMP_V2_ROUTER;
 		}
 		ill->ill_mcast_v2_time = 0;
@@ -1716,7 +1716,7 @@
 				}
 				ill->ill_mcast_v1_time = 0;
 				ill->ill_mcast_v1_tset = 0;
-				atomic_add_16(&ifp->illif_mcast_v1, -1);
+				atomic_dec_16(&ifp->illif_mcast_v1);
 			}
 			if ((ill->ill_mcast_type == IGMP_V2_ROUTER) &&
 			    (ipst->ips_igmp_max_version >= IGMP_V3_ROUTER) &&
@@ -1727,7 +1727,7 @@
 				ill->ill_mcast_type = IGMP_V3_ROUTER;
 				ill->ill_mcast_v2_time = 0;
 				ill->ill_mcast_v2_tset = 0;
-				atomic_add_16(&ifp->illif_mcast_v2, -1);
+				atomic_dec_16(&ifp->illif_mcast_v2);
 			}
 			rw_exit(&ill->ill_mcast_lock);
 			ill_refrele(ill);
@@ -1786,7 +1786,7 @@
 				ill->ill_mcast_type = MLD_V2_ROUTER;
 				ill->ill_mcast_v1_time = 0;
 				ill->ill_mcast_v1_tset = 0;
-				atomic_add_16(&ifp->illif_mcast_v1, -1);
+				atomic_dec_16(&ifp->illif_mcast_v1);
 			}
 			rw_exit(&ill->ill_mcast_lock);
 			ill_refrele(ill);
@@ -2216,7 +2216,7 @@
 	if (ill->ill_mcast_type == MLD_V2_ROUTER) {
 		ip1dbg(("Received MLDv1 Query on %s, switching mode to "
 		    "MLD_V1_ROUTER\n", ill->ill_name));
-		atomic_add_16(&ill->ill_ifptr->illif_mcast_v1, 1);
+		atomic_inc_16(&ill->ill_ifptr->illif_mcast_v1);
 		ill->ill_mcast_type = MLD_V1_ROUTER;
 	}
 
--- old/usr/src/uts/common/inet/ip/ip_attr.c	2014-07-28 07:44:25.422859191 -0400
+++ new/usr/src/uts/common/inet/ip/ip_attr.c	2014-07-28 07:44:25.428787967 -0400
@@ -100,14 +100,14 @@
  */
 #define	IXA_REFRELE(ixa)					\
 {								\
-	if (atomic_add_32_nv(&(ixa)->ixa_refcnt, -1) == 0)	\
+	if (atomic_dec_32_nv(&(ixa)->ixa_refcnt) == 0)	\
 		ixa_inactive(ixa);				\
 }
 
 #define	IXA_REFHOLD(ixa)					\
 {								\
 	ASSERT((ixa)->ixa_refcnt != 0);				\
-	atomic_add_32(&(ixa)->ixa_refcnt, 1);			\
+	atomic_inc_32(&(ixa)->ixa_refcnt);			\
 }
 
 /*
@@ -754,7 +754,7 @@
 
 	/* At least one references for the conn_t */
 	ASSERT(ixa->ixa_refcnt >= 1);
-	if (atomic_add_32_nv(&ixa->ixa_refcnt, 1) == 2) {
+	if (atomic_inc_32_nv(&ixa->ixa_refcnt) == 2) {
 		/* No other thread using conn_ixa */
 		mutex_exit(&connp->conn_lock);
 		return (ixa);
@@ -856,7 +856,7 @@
 	ASSERT(ixa->ixa_refcnt >= 1);
 
 	/* Make sure conn_ixa doesn't disappear while we copy it */
-	atomic_add_32(&ixa->ixa_refcnt, 1);
+	atomic_inc_32(&ixa->ixa_refcnt);
 
 	ixa = kmem_alloc(sizeof (*ixa), KM_NOSLEEP);
 	if (ixa == NULL) {
--- old/usr/src/uts/common/inet/ip/ip_dce.c	2014-07-28 07:44:25.637703945 -0400
+++ new/usr/src/uts/common/inet/ip/ip_dce.c	2014-07-28 07:44:25.643681696 -0400
@@ -532,7 +532,7 @@
 	dce->dce_ptpn = &dcb->dcb_dce;
 	dcb->dcb_dce = dce;
 	dce->dce_bucket = dcb;
-	atomic_add_32(&dcb->dcb_cnt, 1);
+	atomic_inc_32(&dcb->dcb_cnt);
 	dce_refhold(dce);	/* For the caller */
 	rw_exit(&dcb->dcb_lock);
 
@@ -604,7 +604,7 @@
 	dce->dce_ptpn = &dcb->dcb_dce;
 	dcb->dcb_dce = dce;
 	dce->dce_bucket = dcb;
-	atomic_add_32(&dcb->dcb_cnt, 1);
+	atomic_inc_32(&dcb->dcb_cnt);
 	dce_refhold(dce);	/* For the caller */
 	rw_exit(&dcb->dcb_lock);
 
@@ -731,7 +731,7 @@
 	dce->dce_generation = DCE_GENERATION_CONDEMNED;
 	mutex_exit(&dce->dce_lock);
 	/* Count how many condemned dces for kmem_cache callback */
-	atomic_add_32(&ipst->ips_num_dce_condemned, 1);
+	atomic_inc_32(&ipst->ips_num_dce_condemned);
 }
 
 /*
@@ -793,7 +793,7 @@
 		dce->dce_next->dce_ptpn = dce->dce_ptpn;
 	dce->dce_ptpn = NULL;
 	dce->dce_next = NULL;
-	atomic_add_32(&dcb->dcb_cnt, -1);
+	atomic_dec_32(&dcb->dcb_cnt);
 	dce_make_condemned(dce);
 }
 
@@ -808,7 +808,7 @@
 
 	/* Count how many condemned dces for kmem_cache callback */
 	if (DCE_IS_CONDEMNED(dce))
-		atomic_add_32(&ipst->ips_num_dce_condemned, -1);
+		atomic_dec_32(&ipst->ips_num_dce_condemned);
 
 	kmem_cache_free(dce_cache, dce);
 }
@@ -817,14 +817,14 @@
 dce_refrele(dce_t *dce)
 {
 	ASSERT(dce->dce_refcnt != 0);
-	if (atomic_add_32_nv(&dce->dce_refcnt, -1) == 0)
+	if (atomic_dec_32_nv(&dce->dce_refcnt) == 0)
 		dce_inactive(dce);
 }
 
 void
 dce_refhold(dce_t *dce)
 {
-	atomic_add_32(&dce->dce_refcnt, 1);
+	atomic_inc_32(&dce->dce_refcnt);
 	ASSERT(dce->dce_refcnt != 0);
 }
 
@@ -833,14 +833,14 @@
 dce_refrele_notr(dce_t *dce)
 {
 	ASSERT(dce->dce_refcnt != 0);
-	if (atomic_add_32_nv(&dce->dce_refcnt, -1) == 0)
+	if (atomic_dec_32_nv(&dce->dce_refcnt) == 0)
 		dce_inactive(dce);
 }
 
 void
 dce_refhold_notr(dce_t *dce)
 {
-	atomic_add_32(&dce->dce_refcnt, 1);
+	atomic_inc_32(&dce->dce_refcnt);
 	ASSERT(dce->dce_refcnt != 0);
 }
 
--- old/usr/src/uts/common/inet/ip/ip_if.c	2014-07-28 07:44:25.836518410 -0400
+++ new/usr/src/uts/common/inet/ip/ip_if.c	2014-07-28 07:44:25.843266840 -0400
@@ -11776,7 +11776,7 @@
 {
 	ip_stack_t	*ipst = ipif->ipif_ill->ill_ipst;
 
-	ipif->ipif_seqid = atomic_add_64_nv(&ipst->ips_ipif_g_seqid, 1);
+	ipif->ipif_seqid = atomic_inc_64_nv(&ipst->ips_ipif_g_seqid);
 }
 
 /*
@@ -12449,9 +12449,9 @@
 ip_update_source_selection(ip_stack_t *ipst)
 {
 	/* We skip past SRC_GENERATION_VERIFY */
-	if (atomic_add_32_nv(&ipst->ips_src_generation, 1) ==
+	if (atomic_inc_32_nv(&ipst->ips_src_generation) ==
 	    SRC_GENERATION_VERIFY)
-		atomic_add_32(&ipst->ips_src_generation, 1);
+		atomic_inc_32(&ipst->ips_src_generation);
 }
 
 /*
--- old/usr/src/uts/common/inet/ip/ip_ire.c	2014-07-28 07:44:26.658127940 -0400
+++ new/usr/src/uts/common/inet/ip/ip_ire.c	2014-07-28 07:44:26.664053097 -0400
@@ -333,7 +333,7 @@
 void
 ire_refhold(ire_t *ire)
 {
-	atomic_add_32(&(ire)->ire_refcnt, 1);
+	atomic_inc_32(&(ire)->ire_refcnt);
 	ASSERT((ire)->ire_refcnt != 0);
 #ifdef DEBUG
 	ire_trace_ref(ire);
@@ -343,7 +343,7 @@
 void
 ire_refhold_notr(ire_t *ire)
 {
-	atomic_add_32(&(ire)->ire_refcnt, 1);
+	atomic_inc_32(&(ire)->ire_refcnt);
 	ASSERT((ire)->ire_refcnt != 0);
 }
 
@@ -379,7 +379,7 @@
 #endif
 	ASSERT((ire)->ire_refcnt != 0);
 	membar_exit();
-	if (atomic_add_32_nv(&(ire)->ire_refcnt, -1) == 0)
+	if (atomic_dec_32_nv(&(ire)->ire_refcnt) == 0)
 		ire_inactive(ire);
 }
 
@@ -388,7 +388,7 @@
 {
 	ASSERT((ire)->ire_refcnt != 0);
 	membar_exit();
-	if (atomic_add_32_nv(&(ire)->ire_refcnt, -1) == 0)
+	if (atomic_dec_32_nv(&(ire)->ire_refcnt) == 0)
 		ire_inactive(ire);
 }
 
@@ -1272,7 +1272,7 @@
 			 * an identical_ref, but with an ire_ref held.
 			 */
 			if (ire->ire_type != IRE_IF_CLONE) {
-				atomic_add_32(&ire1->ire_identical_ref, 1);
+				atomic_inc_32(&ire1->ire_identical_ref);
 				DTRACE_PROBE2(ire__add__exist, ire_t *, ire1,
 				    ire_t *, ire);
 			}
@@ -1533,7 +1533,7 @@
 	if (!IRE_IS_CONDEMNED(ire)) {
 		/* Is this an IRE representing multiple duplicate entries? */
 		ASSERT(ire->ire_identical_ref >= 1);
-		if (atomic_add_32_nv(&ire->ire_identical_ref, -1) != 0) {
+		if (atomic_dec_32_nv(&ire->ire_identical_ref) != 0) {
 			/* Removed one of the identical parties */
 			rw_exit(&irb->irb_lock);
 			return;
@@ -2618,7 +2618,7 @@
 	ASSERT(!IRE_IS_CONDEMNED(ire));
 	ire->ire_generation = IRE_GENERATION_CONDEMNED;
 	/* Count how many condemned ires for kmem_cache callback */
-	atomic_add_32(&ipst->ips_num_ire_condemned, 1);
+	atomic_inc_32(&ipst->ips_num_ire_condemned);
 	nce = ire->ire_nce_cache;
 	ire->ire_nce_cache = NULL;
 	mutex_exit(&ire->ire_lock);
--- old/usr/src/uts/common/inet/ip/ip_ndp.c	2014-07-28 07:44:26.947263122 -0400
+++ new/usr/src/uts/common/inet/ip/ip_ndp.c	2014-07-28 07:44:26.953381970 -0400
@@ -479,7 +479,7 @@
 	mutex_exit(&ncec->ncec_lock);
 
 	/* Count how many condemned ires for kmem_cache callback */
-	atomic_add_32(&ipst->ips_num_nce_condemned, 1);
+	atomic_inc_32(&ipst->ips_num_nce_condemned);
 	nce_fastpath_list_delete(ncec->ncec_ill, ncec, NULL);
 
 	/* Complete any waiting callbacks */
--- old/usr/src/uts/common/inet/ip/ip_output.c	2014-07-28 07:44:27.293580067 -0400
+++ new/usr/src/uts/common/inet/ip/ip_output.c	2014-07-28 07:44:27.299653754 -0400
@@ -1558,7 +1558,7 @@
 	boolean_t	dummy;
 
 	/* We assign an IP ident for nice errors */
-	ipha->ipha_ident = atomic_add_32_nv(identp, 1);
+	ipha->ipha_ident = atomic_inc_32_nv(identp);
 
 	BUMP_MIB(&ipst->ips_ip_mib, ipIfStatsOutNoRoutes);
 
--- old/usr/src/uts/common/inet/ip/ipsecah.c	2014-07-28 07:44:27.545002193 -0400
+++ new/usr/src/uts/common/inet/ip/ipsecah.c	2014-07-28 07:44:27.551084094 -0400
@@ -2574,7 +2574,7 @@
 		phdr_ah->ah_spi = assoc->ipsa_spi;
 
 		phdr_ah->ah_replay =
-		    htonl(atomic_add_32_nv(&assoc->ipsa_replay, 1));
+		    htonl(atomic_inc_32_nv(&assoc->ipsa_replay));
 		if (phdr_ah->ah_replay == 0 && assoc->ipsa_replay_wsize != 0) {
 			/*
 			 * XXX We have replay counter wrapping.  We probably
--- old/usr/src/uts/common/inet/ip/ipsecesp.c	2014-07-28 07:44:27.838131441 -0400
+++ new/usr/src/uts/common/inet/ip/ipsecesp.c	2014-07-28 07:44:27.844232184 -0400
@@ -2818,7 +2818,7 @@
 
 	esph_ptr->esph_spi = assoc->ipsa_spi;
 
-	esph_ptr->esph_replay = htonl(atomic_add_32_nv(&assoc->ipsa_replay, 1));
+	esph_ptr->esph_replay = htonl(atomic_inc_32_nv(&assoc->ipsa_replay));
 	if (esph_ptr->esph_replay == 0 && assoc->ipsa_replay_wsize != 0) {
 		/*
 		 * XXX We have replay counter wrapping.
--- old/usr/src/uts/common/inet/ip/keysock.c	2014-07-28 07:44:28.140034803 -0400
+++ new/usr/src/uts/common/inet/ip/keysock.c	2014-07-28 07:44:28.146127638 -0400
@@ -537,7 +537,7 @@
 		ks3dbg(keystack,
 		    ("Driver close, PF_KEY socket is going away.\n"));
 		if ((ks->keysock_flags & KEYSOCK_EXTENDED) != 0)
-			atomic_add_32(&keystack->keystack_num_extended, -1);
+			atomic_dec_32(&keystack->keystack_num_extended);
 		size = sizeof (keysock_t);
 		mutex_enter(&keystack->keystack_list_lock);
 		*(ks->keysock_ptpn) = ks->keysock_next;
@@ -1565,7 +1565,7 @@
 	/*
 	 * Set global to indicate we prefer an extended ACQUIRE.
 	 */
-	atomic_add_32(&keystack->keystack_num_extended, 1);
+	atomic_inc_32(&keystack->keystack_num_extended);
 }
 
 static void
@@ -2335,8 +2335,8 @@
 			 * the last one, send up the end-of-{FLUSH,DUMP} to
 			 * the appropriate PF_KEY socket.
 			 */
-			if (atomic_add_32_nv(&keystack->keystack_flushdump,
-			    -1) != 0) {
+			if (atomic_dec_32_nv(&keystack->keystack_flushdump) !=
+			    0) {
 				ks1dbg(keystack,
 				    ("One flush/dump message back from %d,"
 				    " more to go.\n", samsg->sadb_msg_satype));
@@ -2382,5 +2382,5 @@
 {
 	keysock_stack_t	*keystack = ns->netstack_keysock;
 
-	return (atomic_add_32_nv(&keystack->keystack_acquire_seq, -1));
+	return (atomic_dec_32_nv(&keystack->keystack_acquire_seq));
 }
--- old/usr/src/uts/common/inet/ip/spd.c	2014-07-28 07:44:28.385733893 -0400
+++ new/usr/src/uts/common/inet/ip/spd.c	2014-07-28 07:44:28.391905089 -0400
@@ -3263,7 +3263,7 @@
 		if (ap == NULL)
 			break;
 		membar_exit();
-		if (atomic_add_32_nv(&(ap)->ipa_refs, -1) != 0)
+		if (atomic_dec_32_nv(&(ap)->ipa_refs) != 0)
 			break;
 		/* End inlined IPACT_REFRELE */
 	}
--- old/usr/src/uts/common/inet/ip_ire.h	2014-07-28 07:44:28.782473359 -0400
+++ new/usr/src/uts/common/inet/ip_ire.h	2014-07-28 07:44:28.788344698 -0400
@@ -102,7 +102,7 @@
  * We use atomics so that we get an accurate accounting on the ires.
  * Otherwise we can't determine leaks correctly.
  */
-#define	BUMP_IRE_STATS(ire_stats, x) atomic_add_64(&(ire_stats).x, 1)
+#define	BUMP_IRE_STATS(ire_stats, x) atomic_inc_64(&(ire_stats).x)
 
 #ifdef _KERNEL
 struct ts_label_s;
--- old/usr/src/uts/common/inet/ipf/netinet/ip_compat.h	2014-07-28 07:44:28.958909721 -0400
+++ new/usr/src/uts/common/inet/ipf/netinet/ip_compat.h	2014-07-28 07:44:28.964917733 -0400
@@ -240,18 +240,18 @@
 #  endif /* SOLARIS2 >= 10 */
 #  if SOLARIS2 >= 6
 #   if SOLARIS2 == 6
-#    define	ATOMIC_INCL(x)		atomic_add_long((uint32_t*)&(x), 1)
-#    define	ATOMIC_DECL(x)		atomic_add_long((uint32_t*)&(x), -1)
+#    define	ATOMIC_INCL(x)		atomic_inc_ulong((uint32_t *)&(x))
+#    define	ATOMIC_DECL(x)		atomic_dec_ulong((uint32_t *)&(x))
 #   else
-#    define	ATOMIC_INCL(x)		atomic_add_long(&(x), 1)
-#    define	ATOMIC_DECL(x)		atomic_add_long(&(x), -1)
+#    define	ATOMIC_INCL(x)		atomic_inc_ulong(&(x))
+#    define	ATOMIC_DECL(x)		atomic_dec_ulong(&(x))
 #   endif /* SOLARIS2 == 6 */
-#   define	ATOMIC_INC64(x)		atomic_add_64((uint64_t*)&(x), 1)
-#   define	ATOMIC_INC32(x)		atomic_add_32((uint32_t*)&(x), 1)
-#   define	ATOMIC_INC16(x)		atomic_add_16((uint16_t*)&(x), 1)
-#   define	ATOMIC_DEC64(x)		atomic_add_64((uint64_t*)&(x), -1)
-#   define	ATOMIC_DEC32(x)		atomic_add_32((uint32_t*)&(x), -1)
-#   define	ATOMIC_DEC16(x)		atomic_add_16((uint16_t*)&(x), -1)
+#   define	ATOMIC_INC64(x)		atomic_inc_64((uint64_t *)&(x))
+#   define	ATOMIC_INC32(x)		atomic_inc_32((uint32_t *)&(x))
+#   define	ATOMIC_INC16(x)		atomic_inc_16((uint16_t *)&(x))
+#   define	ATOMIC_DEC64(x)		atomic_dec_64((uint64_t *)&(x))
+#   define	ATOMIC_DEC32(x)		atomic_dec_32((uint32_t *)&(x))
+#   define	ATOMIC_DEC16(x)		atomic_dec_16((uint16_t *)&(x))
 #  else
 #   define	ATOMIC_INC(x)		{ mutex_enter(&ipf_rw); (x)++; \
 					  mutex_exit(&ipf_rw); }
@@ -925,14 +925,14 @@
 					  mtx_unlock(&ipf_rw.ipf_lk); }
 #   define	ATOMIC_DEC(x)		{ mtx_lock(&ipf_rw.ipf_lk); (x)--; \
 					  mtx_unlock(&ipf_rw.ipf_lk); }
-#   define	ATOMIC_INCL(x)		atomic_add_long(&(x), 1)
+#   define	ATOMIC_INCL(x)		atomic_inc_ulong(&(x))
 #   define	ATOMIC_INC64(x)		ATOMIC_INC(x)
-#   define	ATOMIC_INC32(x)		atomic_add_32(&(x), 1)
-#   define	ATOMIC_INC16(x)		atomic_add_16(&(x), 1)
-#   define	ATOMIC_DECL(x)		atomic_add_long(&(x), -1)
+#   define	ATOMIC_INC32(x)		atomic_inc_32(&(x))
+#   define	ATOMIC_INC16(x)		atomic_inc_16(&(x))
+#   define	ATOMIC_DECL(x)		atomic_dec_ulong(&(x))
 #   define	ATOMIC_DEC64(x)		ATOMIC_DEC(x)
-#   define	ATOMIC_DEC32(x)		atomic_add_32(&(x), -1)
-#   define	ATOMIC_DEC16(x)		atomic_add_16(&(x), -1)
+#   define	ATOMIC_DEC32(x)		atomic_dec_32(&(x))
+#   define	ATOMIC_DEC16(x)		atomic_dec_16(&(x))
 #   define	SPL_X(x)	;
 #   define	SPL_NET(x)	;
 #   define	SPL_IMP(x)	;
--- old/usr/src/uts/common/inet/ipsec_impl.h	2014-07-28 07:44:29.223632083 -0400
+++ new/usr/src/uts/common/inet/ipsec_impl.h	2014-07-28 07:44:29.229556931 -0400
@@ -298,13 +298,13 @@
 } ipsec_action_t;
 
 #define	IPACT_REFHOLD(ipa) {			\
-	atomic_add_32(&(ipa)->ipa_refs, 1);	\
+	atomic_inc_32(&(ipa)->ipa_refs);	\
 	ASSERT((ipa)->ipa_refs != 0);	\
 }
 #define	IPACT_REFRELE(ipa) {					\
 	ASSERT((ipa)->ipa_refs != 0);				\
 	membar_exit();						\
-	if (atomic_add_32_nv(&(ipa)->ipa_refs, -1) == 0)	\
+	if (atomic_dec_32_nv(&(ipa)->ipa_refs) == 0)	\
 		ipsec_action_free(ipa);				\
 	(ipa) = 0;						\
 }
@@ -414,13 +414,13 @@
 };
 
 #define	IPPOL_REFHOLD(ipp) {			\
-	atomic_add_32(&(ipp)->ipsp_refs, 1);	\
+	atomic_inc_32(&(ipp)->ipsp_refs);	\
 	ASSERT((ipp)->ipsp_refs != 0);		\
 }
 #define	IPPOL_REFRELE(ipp) {					\
 	ASSERT((ipp)->ipsp_refs != 0);				\
 	membar_exit();						\
-	if (atomic_add_32_nv(&(ipp)->ipsp_refs, -1) == 0)	\
+	if (atomic_dec_32_nv(&(ipp)->ipsp_refs) == 0)	\
 		ipsec_policy_free(ipp);				\
 	(ipp) = 0;						\
 }
@@ -461,13 +461,13 @@
 } ipsec_policy_head_t;
 
 #define	IPPH_REFHOLD(iph) {			\
-	atomic_add_32(&(iph)->iph_refs, 1);	\
+	atomic_inc_32(&(iph)->iph_refs);	\
 	ASSERT((iph)->iph_refs != 0);		\
 }
 #define	IPPH_REFRELE(iph, ns) {					\
 	ASSERT((iph)->iph_refs != 0);				\
 	membar_exit();						\
-	if (atomic_add_32_nv(&(iph)->iph_refs, -1) == 0)	\
+	if (atomic_dec_32_nv(&(iph)->iph_refs) == 0)	\
 		ipsec_polhead_free(iph, ns);			\
 	(iph) = 0;						\
 }
@@ -548,14 +548,14 @@
 	ITPF_I_PER_PORT_SECURITY))
 
 #define	ITP_REFHOLD(itp) { \
-	atomic_add_32(&((itp)->itp_refcnt), 1);	\
+	atomic_inc_32(&((itp)->itp_refcnt));	\
 	ASSERT((itp)->itp_refcnt != 0); \
 }
 
 #define	ITP_REFRELE(itp, ns) { \
 	ASSERT((itp)->itp_refcnt != 0); \
 	membar_exit(); \
-	if (atomic_add_32_nv(&((itp)->itp_refcnt), -1) == 0) \
+	if (atomic_dec_32_nv(&((itp)->itp_refcnt)) == 0) \
 		itp_free(itp, ns); \
 }
 
@@ -577,7 +577,7 @@
  */
 
 #define	IPSID_REFHOLD(ipsid) {			\
-	atomic_add_32(&(ipsid)->ipsid_refcnt, 1);	\
+	atomic_inc_32(&(ipsid)->ipsid_refcnt);	\
 	ASSERT((ipsid)->ipsid_refcnt != 0);	\
 }
 
@@ -588,7 +588,7 @@
 
 #define	IPSID_REFRELE(ipsid) {					\
 	membar_exit();						\
-	atomic_add_32(&(ipsid)->ipsid_refcnt, -1);		\
+	atomic_dec_32(&(ipsid)->ipsid_refcnt);		\
 }
 
 /*
--- old/usr/src/uts/common/inet/kssl/ksslimpl.h	2014-07-28 07:44:29.418833656 -0400
+++ new/usr/src/uts/common/inet/kssl/ksslimpl.h	2014-07-28 07:44:29.425153832 -0400
@@ -123,14 +123,14 @@
 } mech_to_cipher_t;
 
 #define	KSSL_ENTRY_REFHOLD(kssl_entry) {				\
-	atomic_add_32(&(kssl_entry)->ke_refcnt, 1);			\
+	atomic_inc_32(&(kssl_entry)->ke_refcnt);			\
 	ASSERT((kssl_entry)->ke_refcnt != 0);				\
 }
 
 #define	KSSL_ENTRY_REFRELE(kssl_entry) {				\
 	ASSERT((kssl_entry)->ke_refcnt != 0);				\
 	membar_exit();							\
-	if (atomic_add_32_nv(&(kssl_entry)->ke_refcnt, -1) == 0) {	\
+	if (atomic_dec_32_nv(&(kssl_entry)->ke_refcnt) == 0) {	\
 		kssl_free_entry((kssl_entry));				\
 	}								\
 }
--- old/usr/src/uts/common/inet/nca/nca.h	2014-07-28 07:44:29.589366900 -0400
+++ new/usr/src/uts/common/inet/nca/nca.h	2014-07-28 07:44:29.595477771 -0400
@@ -959,7 +959,7 @@
 #define	DCB_RD_EXIT(cpu) {						\
 	uint32_t *rp = &nca_gv[cpu].dcb_readers;			\
 									\
-	if (atomic_add_32_nv(rp, -1) == DCB_COUNT_USELOCK) {		\
+	if (atomic_dec_32_nv(rp) == DCB_COUNT_USELOCK) {		\
 		mutex_enter(&nca_dcb_lock);				\
 		if (CV_HAS_WAITERS(&nca_dcb_wait)) {			\
 			/* May be the last reader for this CPU */	\
--- old/usr/src/uts/common/inet/sadb.h	2014-07-28 07:44:29.828414795 -0400
+++ new/usr/src/uts/common/inet/sadb.h	2014-07-28 07:44:29.834341002 -0400
@@ -353,7 +353,7 @@
  */
 
 #define	IPSA_REFHOLD(ipsa) {			\
-	atomic_add_32(&(ipsa)->ipsa_refcnt, 1);	\
+	atomic_inc_32(&(ipsa)->ipsa_refcnt);	\
 	ASSERT((ipsa)->ipsa_refcnt != 0);	\
 }
 
@@ -368,7 +368,7 @@
 #define	IPSA_REFRELE(ipsa) {					\
 	ASSERT((ipsa)->ipsa_refcnt != 0);			\
 	membar_exit();						\
-	if (atomic_add_32_nv(&(ipsa)->ipsa_refcnt, -1) == 0)	\
+	if (atomic_dec_32_nv(&(ipsa)->ipsa_refcnt) == 0)	\
 		((ipsa)->ipsa_freefunc)(ipsa);			\
 }
 
--- old/usr/src/uts/common/inet/sctp/sctp.c	2014-07-28 07:44:30.023345376 -0400
+++ new/usr/src/uts/common/inet/sctp/sctp.c	2014-07-28 07:44:30.029326618 -0400
@@ -1756,7 +1756,7 @@
 	ASSERT(sctps->sctps_recvq_tq_list[
 	    sctps->sctps_recvq_tq_list_cur_sz] == NULL);
 	sctps->sctps_recvq_tq_list[sctps->sctps_recvq_tq_list_cur_sz] = tq;
-	atomic_add_32(&sctps->sctps_recvq_tq_list_cur_sz, 1);
+	atomic_inc_32(&sctps->sctps_recvq_tq_list_cur_sz);
 	mutex_exit(&sctps->sctps_rq_tq_lock);
 }
 
@@ -1783,7 +1783,7 @@
 	 * this loop.  The problem this will create is that the loop may
 	 * not have tried all the recvq_tq.  This should be OK.
 	 */
-	next_tq = atomic_add_32_nv(&sctps->sctps_recvq_tq_list_cur, 1) %
+	next_tq = atomic_inc_32_nv(&sctps->sctps_recvq_tq_list_cur) %
 	    sctps->sctps_recvq_tq_list_cur_sz;
 	for (try = 0; try < sctps->sctps_recvq_tq_list_cur_sz; try++) {
 		tq = sctps->sctps_recvq_tq_list[next_tq];
--- old/usr/src/uts/common/inet/sctp/sctp_addr.c	2014-07-28 07:44:30.258120073 -0400
+++ new/usr/src/uts/common/inet/sctp/sctp_addr.c	2014-07-28 07:44:30.264071392 -0400
@@ -137,7 +137,7 @@
 	rw_destroy(&sctp_ipif->sctp_ipif_lock);
 	kmem_free(sctp_ipif, sizeof (sctp_ipif_t));
 
-	(void) atomic_add_32_nv(&sctp_ill->sctp_ill_ipifcnt, -1);
+	(void) atomic_dec_32_nv(&sctp_ill->sctp_ill_ipifcnt);
 	if (rw_tryupgrade(&sctps->sctps_g_ills_lock) != 0) {
 		rw_downgrade(&sctps->sctps_g_ipifs_lock);
 		if (sctp_ill->sctp_ill_ipifcnt == 0 &&
@@ -884,8 +884,8 @@
 	ASSERT(sctp_ipif->sctp_ipif_ill == fsctp_ill);
 	sctp_ipif->sctp_ipif_ill = tsctp_ill;
 	rw_exit(&sctp_ipif->sctp_ipif_lock);
-	(void) atomic_add_32_nv(&fsctp_ill->sctp_ill_ipifcnt, -1);
-	atomic_add_32(&tsctp_ill->sctp_ill_ipifcnt, 1);
+	(void) atomic_dec_32_nv(&fsctp_ill->sctp_ill_ipifcnt);
+	atomic_inc_32(&tsctp_ill->sctp_ill_ipifcnt);
 	rw_exit(&sctps->sctps_g_ipifs_lock);
 	rw_exit(&sctps->sctps_g_ills_lock);
 }
@@ -1097,8 +1097,7 @@
 			sctps->sctps_g_ipifs_count--;
 			rw_destroy(&osctp_ipif->sctp_ipif_lock);
 			kmem_free(osctp_ipif, sizeof (sctp_ipif_t));
-			(void) atomic_add_32_nv(&osctp_ill->sctp_ill_ipifcnt,
-			    -1);
+			(void) atomic_dec_32_nv(&osctp_ill->sctp_ill_ipifcnt);
 		}
 	}
 
@@ -1130,7 +1129,7 @@
 	list_insert_head(&sctps->sctps_g_ipifs[hindex].sctp_ipif_list,
 	    (void *)sctp_ipif);
 	sctps->sctps_g_ipifs[hindex].ipif_count++;
-	atomic_add_32(&sctp_ill->sctp_ill_ipifcnt, 1);
+	atomic_inc_32(&sctp_ill->sctp_ill_ipifcnt);
 	if (sctp_ipif->sctp_ipif_state == SCTP_IPIFS_UP)
 		sctp_chk_and_updt_saddr(hindex, sctp_ipif, sctps);
 	rw_exit(&sctps->sctps_g_ipifs_lock);
@@ -1210,7 +1209,7 @@
 		sctps->sctps_g_ipifs_count--;
 		rw_destroy(&sctp_ipif->sctp_ipif_lock);
 		kmem_free(sctp_ipif, sizeof (sctp_ipif_t));
-		(void) atomic_add_32_nv(&sctp_ill->sctp_ill_ipifcnt, -1);
+		(void) atomic_dec_32_nv(&sctp_ill->sctp_ill_ipifcnt);
 		if (rw_tryupgrade(&sctps->sctps_g_ills_lock) != 0) {
 			rw_downgrade(&sctps->sctps_g_ipifs_lock);
 			if (sctp_ill->sctp_ill_ipifcnt == 0 &&
@@ -2030,8 +2029,7 @@
 			list_remove(&sctps->sctps_g_ipifs[i].sctp_ipif_list,
 			    sctp_ipif);
 			sctps->sctps_g_ipifs_count--;
-			(void) atomic_add_32_nv(&sctp_ill->sctp_ill_ipifcnt,
-			    -1);
+			(void) atomic_dec_32_nv(&sctp_ill->sctp_ill_ipifcnt);
 			kmem_free(sctp_ipif, sizeof (sctp_ipif_t));
 			sctp_ipif =
 			    list_tail(&sctps->sctps_g_ipifs[i].sctp_ipif_list);
--- old/usr/src/uts/common/inet/sctp/sctp_conn.c	2014-07-28 07:44:30.502218212 -0400
+++ new/usr/src/uts/common/inet/sctp/sctp_conn.c	2014-07-28 07:44:30.508166226 -0400
@@ -168,9 +168,9 @@
 	if (slc != NULL) {
 		int64_t now;
 
-		if (atomic_add_32_nv(&slc->slc_cnt, 1) > slc->slc_max + 1) {
+		if (atomic_inc_32_nv(&slc->slc_cnt) > slc->slc_max + 1) {
 			now = ddi_get_lbolt64();
-			atomic_add_32(&slc->slc_cnt, -1);
+			atomic_dec_32(&slc->slc_cnt);
 			SCTP_KSTAT(sctps, sctp_listen_cnt_drop);
 			slc->slc_drop++;
 			if (now - slc->slc_report_time >
@@ -189,7 +189,7 @@
 
 	if ((eager = sctp_create_eager(sctp)) == NULL) {
 		if (slc_set)
-			atomic_add_32(&slc->slc_cnt, -1);
+			atomic_dec_32(&slc->slc_cnt);
 		return (NULL);
 	}
 	econnp = eager->sctp_connp;
--- old/usr/src/uts/common/inet/sctp/sctp_impl.h	2014-07-28 07:44:30.687075160 -0400
+++ new/usr/src/uts/common/inet/sctp/sctp_impl.h	2014-07-28 07:44:30.693117018 -0400
@@ -404,7 +404,7 @@
 #define	SCTP_DECR_LISTEN_CNT(sctp)					\
 {									\
 	ASSERT((sctp)->sctp_listen_cnt->slc_cnt > 0);			\
-	if (atomic_add_32_nv(&(sctp)->sctp_listen_cnt->slc_cnt, -1) == 0) \
+	if (atomic_dec_32_nv(&(sctp)->sctp_listen_cnt->slc_cnt) == 0) \
 		kmem_free((sctp)->sctp_listen_cnt, sizeof (sctp_listen_cnt_t));\
 	(sctp)->sctp_listen_cnt = NULL;					\
 }
--- old/usr/src/uts/common/inet/tcp/tcp_input.c	2014-07-28 07:44:30.893141871 -0400
+++ new/usr/src/uts/common/inet/tcp/tcp_input.c	2014-07-28 07:44:30.899248501 -0400
@@ -1426,10 +1426,10 @@
 		tcp_listen_cnt_t *tlc = listener->tcp_listen_cnt;
 		int64_t now;
 
-		if (atomic_add_32_nv(&tlc->tlc_cnt, 1) > tlc->tlc_max + 1) {
+		if (atomic_inc_32_nv(&tlc->tlc_cnt) > tlc->tlc_max + 1) {
 			mutex_exit(&listener->tcp_eager_lock);
 			now = ddi_get_lbolt64();
-			atomic_add_32(&tlc->tlc_cnt, -1);
+			atomic_dec_32(&tlc->tlc_cnt);
 			TCP_STAT(tcps, tcp_listen_cnt_drop);
 			tlc->tlc_drop++;
 			if (now - tlc->tlc_report_time >
@@ -1871,7 +1871,7 @@
 error2:
 	freemsg(mp);
 	if (tlc_set)
-		atomic_add_32(&listener->tcp_listen_cnt->tlc_cnt, -1);
+		atomic_dec_32(&listener->tcp_listen_cnt->tlc_cnt);
 }
 
 /*
--- old/usr/src/uts/common/inet/tcp_impl.h	2014-07-28 07:44:31.271312592 -0400
+++ new/usr/src/uts/common/inet/tcp_impl.h	2014-07-28 07:44:31.277321045 -0400
@@ -371,7 +371,7 @@
 #define	TCP_DECR_LISTEN_CNT(tcp)					\
 {									\
 	ASSERT((tcp)->tcp_listen_cnt->tlc_cnt > 0);			\
-	if (atomic_add_32_nv(&(tcp)->tcp_listen_cnt->tlc_cnt, -1) == 0) \
+	if (atomic_dec_32_nv(&(tcp)->tcp_listen_cnt->tlc_cnt) == 0) \
 		kmem_free((tcp)->tcp_listen_cnt, sizeof (tcp_listen_cnt_t)); \
 	(tcp)->tcp_listen_cnt = NULL;					\
 }
--- old/usr/src/uts/common/io/bscbus.c	2014-07-28 07:44:31.459257227 -0400
+++ new/usr/src/uts/common/io/bscbus.c	2014-07-28 07:44:31.465387861 -0400
@@ -2622,7 +2622,7 @@
 		return;
 	if ((bscbus_cmd_log_flags & (1 << cat)) == 0)
 		return;
-	idx = atomic_add_32_nv(&ssp->cmd_log_idx, 1);
+	idx = atomic_inc_32_nv(&ssp->cmd_log_idx);
 	logp = &ssp->cmd_log[idx % ssp->cmd_log_size];
 	logp->bcl_seq = idx;
 	logp->bcl_cat = cat;
--- old/usr/src/uts/common/io/chxge/pe.c	2014-07-28 07:44:31.701241464 -0400
+++ new/usr/src/uts/common/io/chxge/pe.c	2014-07-28 07:44:31.707318343 -0400
@@ -35,8 +35,6 @@
  * Interface code
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/types.h>
 #include <sys/systm.h>
 #include <sys/cmn_err.h>
@@ -1390,7 +1388,7 @@
 		 * We decrement here so anyone trying to do fini will
 		 * only remove the driver once the counts go to 0.
 		 */
-		atomic_add_32(&buffers_in_use[i], -1);
+		atomic_dec_32(&buffers_in_use[i]);
 
 		return;
 	}
@@ -1403,7 +1401,7 @@
 	/*
 	 * decrement count of receive buffers freed by callback
 	 */
-	atomic_add_32(&buffers_in_use[rbp->cs_index], -1);
+	atomic_dec_32(&buffers_in_use[rbp->cs_index]);
 }
 
 /*
@@ -1433,7 +1431,7 @@
 		 * We decrement here so anyone trying to do fini will
 		 * only remove the driver once the counts go to 0.
 		 */
-		atomic_add_32(&buffers_in_use[i], -1);
+		atomic_dec_32(&buffers_in_use[i]);
 
 		return;
 	}
@@ -1446,7 +1444,7 @@
 	/*
 	 * decrement count of receive buffers freed by callback
 	 */
-	atomic_add_32(&buffers_in_use[rbp->cs_index], -1);
+	atomic_dec_32(&buffers_in_use[rbp->cs_index]);
 }
 
 /*
--- old/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd.c	2014-07-28 07:44:31.920897715 -0400
+++ new/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd.c	2014-07-28 07:44:31.926951116 -0400
@@ -2010,7 +2010,7 @@
 	}
 
 	sl->sl_trans_op = SL_OP_NONE;
-	atomic_add_32(&sbd_lu_count, 1);
+	atomic_inc_32(&sbd_lu_count);
 	return (0);
 
 scm_err_out:
@@ -2184,7 +2184,7 @@
 	}
 
 	sl->sl_trans_op = SL_OP_NONE;
-	atomic_add_32(&sbd_lu_count, 1);
+	atomic_inc_32(&sbd_lu_count);
 	return (0);
 
 scs_err_out:
@@ -2543,7 +2543,7 @@
 		if (ret) {
 			goto sim_err_out;
 		}
-		atomic_add_32(&sbd_lu_count, 1);
+		atomic_inc_32(&sbd_lu_count);
 	}
 
 	bcopy(sl->sl_device_id + 4, ilu->ilu_ret_guid, 16);
@@ -2949,7 +2949,7 @@
 sdl_do_dereg:;
 	if (stmf_deregister_lu(sl->sl_lu) != STMF_SUCCESS)
 		return (EBUSY);
-	atomic_add_32(&sbd_lu_count, -1);
+	atomic_dec_32(&sbd_lu_count);
 
 	return (sbd_close_delete_lu(sl, 0));
 }
--- old/usr/src/uts/common/io/comstar/port/fcoet/fcoet.h	2014-07-28 07:44:32.213255935 -0400
+++ new/usr/src/uts/common/io/comstar/port/fcoet/fcoet.h	2014-07-28 07:44:32.219265448 -0400
@@ -223,8 +223,8 @@
  * These two situation should seldom happen. But just invoke this seems won't
  * downgrade the performance too much, so we keep it.
  */
-#define	FCOET_BUSY_XCHG(xch)	atomic_add_8(&(xch)->xch_ref, 1)
-#define	FCOET_RELE_XCHG(xch)	atomic_add_8(&(xch)->xch_ref, -1)
+#define	FCOET_BUSY_XCHG(xch)	atomic_inc_8(&(xch)->xch_ref)
+#define	FCOET_RELE_XCHG(xch)	atomic_dec_8(&(xch)->xch_ref)
 
 #define	XCH_FLAG_NONFCP_REQ_SENT	0x0001
 #define	XCH_FLAG_NONFCP_RESP_SENT	0x0002
--- old/usr/src/uts/common/io/comstar/port/fcoet/fcoet_fc.c	2014-07-28 07:44:32.385899972 -0400
+++ new/usr/src/uts/common/io/comstar/port/fcoet/fcoet_fc.c	2014-07-28 07:44:32.392079274 -0400
@@ -304,7 +304,7 @@
 		FFM_S_ID(cmd->cmd_lportid, frm);
 		FFM_D_ID(cmd->cmd_rportid, frm);
 		FFM_SEQ_CNT(xch->xch_sequence_no, frm);
-		atomic_add_8(&xch->xch_sequence_no, 1);
+		atomic_inc_8(&xch->xch_sequence_no);
 		FFM_PARAM(offset, frm);
 		offset += data_size;
 		left_size -= data_size;
@@ -938,9 +938,9 @@
 		fcoet_init_tfm(frm, NULL);
 		bzero(frm->frm_payload, frm->frm_payload_size);
 	}
-	xch_oxid = atomic_add_16_nv(&ss->ss_next_sol_oxid, 1);
+	xch_oxid = atomic_inc_16_nv(&ss->ss_next_sol_oxid);
 	if (xch_oxid == 0xFFFF) {
-		xch_oxid = atomic_add_16_nv(&ss->ss_next_sol_oxid, 1);
+		xch_oxid = atomic_inc_16_nv(&ss->ss_next_sol_oxid);
 	}
 	FFM_R_CTL(0x22, frm);
 	FRM2TFM(frm)->tfm_rctl = 0x22;
--- old/usr/src/uts/common/io/comstar/port/fct/discovery.c	2014-07-28 07:44:32.581633048 -0400
+++ new/usr/src/uts/common/io/comstar/port/fct/discovery.c	2014-07-28 07:44:32.587816790 -0400
@@ -938,7 +938,7 @@
 		fct_post_to_discovery_queue(iport, irp, NULL);
 
 		/* A PLOGI also invalidates any RSCNs related to this rp */
-		atomic_add_32(&irp->irp_rscn_counter, 1);
+		atomic_inc_32(&irp->irp_rscn_counter);
 	} else {
 		/*
 		 * For everything else, we have (or be able to lookup) a
@@ -983,7 +983,7 @@
 		 */
 		atomic_or_32(&icmd->icmd_flags, ICMD_IMPLICIT_CMD_HAS_RESOURCE);
 	}
-	atomic_add_16(&irp->irp_nonfcp_xchg_count, 1);
+	atomic_inc_16(&irp->irp_nonfcp_xchg_count);
 
 	/*
 	 * Grab the remote port lock while we modify the port state.
@@ -998,13 +998,13 @@
 		if ((op == ELS_OP_PLOGI) || (op == ELS_OP_LOGO)) {
 			rf |= IRP_PLOGI_DONE;
 			if (irp->irp_flags & IRP_PLOGI_DONE)
-				atomic_add_32(&iport->iport_nrps_login, -1);
+				atomic_dec_32(&iport->iport_nrps_login);
 		}
-		atomic_add_16(&irp->irp_sa_elses_count, 1);
+		atomic_inc_16(&irp->irp_sa_elses_count);
 		atomic_and_32(&irp->irp_flags, ~rf);
 		atomic_or_32(&icmd->icmd_flags, ICMD_SESSION_AFFECTING);
 	} else {
-		atomic_add_16(&irp->irp_nsa_elses_count, 1);
+		atomic_inc_16(&irp->irp_nsa_elses_count);
 	}
 
 	fct_post_to_discovery_queue(iport, irp, icmd);
@@ -1160,7 +1160,7 @@
 		iport->iport_rp_slots[rp->rp_handle] = irp;
 		atomic_or_32(&irp->irp_flags, IRP_HANDLE_OPENED);
 	}
-	(void) atomic_add_64_nv(&iport->iport_last_change, 1);
+	(void) atomic_inc_64_nv(&iport->iport_last_change);
 	fct_log_remote_port_event(port, ESC_SUNFC_TARGET_ADD,
 	    rp->rp_pwwn, rp->rp_id);
 
@@ -1205,7 +1205,7 @@
 		atomic_and_32(&irp->irp_flags, ~IRP_HANDLE_OPENED);
 		iport->iport_rp_slots[rp->rp_handle] = NULL;
 	}
-	(void) atomic_add_64_nv(&iport->iport_last_change, 1);
+	(void) atomic_inc_64_nv(&iport->iport_last_change);
 	fct_log_remote_port_event(port, ESC_SUNFC_TARGET_REMOVE,
 	    rp->rp_pwwn, rp->rp_id);
 
@@ -1511,12 +1511,12 @@
 			}
 		}
 	}
-	atomic_add_16(&irp->irp_sa_elses_count, -1);
+	atomic_dec_16(&irp->irp_sa_elses_count);
 
 	if (ret == FCT_SUCCESS) {
 		if (cmd_type == FCT_CMD_RCVD_ELS) {
 			atomic_or_32(&irp->irp_flags, IRP_PLOGI_DONE);
-			atomic_add_32(&iport->iport_nrps_login, 1);
+			atomic_inc_32(&iport->iport_nrps_login);
 			if (irp->irp_deregister_timer)
 				irp->irp_deregister_timer = 0;
 		}
@@ -1597,7 +1597,7 @@
 			    els->els_req_size, els->els_req_payload[6]);
 
 		fct_dequeue_els(irp);
-		atomic_add_16(&irp->irp_sa_elses_count, -1);
+		atomic_dec_16(&irp->irp_sa_elses_count);
 		ret = fct_send_accrjt(cmd, ELS_OP_LSRJT, 3, 0x2c);
 		goto prli_end;
 	}
@@ -1671,7 +1671,7 @@
 	}
 
 	fct_dequeue_els(irp);
-	atomic_add_16(&irp->irp_sa_elses_count, -1);
+	atomic_dec_16(&irp->irp_sa_elses_count);
 	if (ses == NULL) {
 		/* fail PRLI */
 		ret = fct_send_accrjt(cmd, ELS_OP_LSRJT, 3, 0);
@@ -1775,7 +1775,7 @@
 	}
 
 	fct_dequeue_els(irp);
-	atomic_add_16(&irp->irp_sa_elses_count, -1);
+	atomic_dec_16(&irp->irp_sa_elses_count);
 
 	/* don't send response if this is an implicit logout cmd */
 	if (!(icmd->icmd_flags & ICMD_IMPLICIT)) {
@@ -1886,7 +1886,7 @@
 	}
 
 	fct_dequeue_els(irp);
-	atomic_add_16(&irp->irp_sa_elses_count, -1);
+	atomic_dec_16(&irp->irp_sa_elses_count);
 	ret = fct_send_accrjt(cmd, ELS_OP_ACC, 0, 0);
 	if (ret != FCT_SUCCESS)
 		fct_queue_cmd_for_termination(cmd, ret);
@@ -1911,7 +1911,7 @@
 	fct_status_t		ret;
 
 	fct_dequeue_els(irp);
-	atomic_add_16(&irp->irp_nsa_elses_count, -1);
+	atomic_dec_16(&irp->irp_nsa_elses_count);
 
 	/* Validate the adisc request */
 	p = els->els_req_payload;
@@ -1949,7 +1949,7 @@
 
 	ASSERT(icmd->icmd_cmd->cmd_type == FCT_CMD_RCVD_ELS);
 	fct_dequeue_els(ICMD_TO_IRP(icmd));
-	atomic_add_16(&ICMD_TO_IRP(icmd)->irp_nsa_elses_count, -1);
+	atomic_dec_16(&ICMD_TO_IRP(icmd)->irp_nsa_elses_count);
 	op = ICMD_TO_ELS(icmd)->els_req_payload[0];
 	stmf_trace(iport->iport_alias, "Rejecting unknown unsol els %x (%s)",
 	    op, FCT_ELS_NAME(op));
@@ -1971,7 +1971,7 @@
 	uint32_t		 rscn_req_size;
 
 	fct_dequeue_els(ICMD_TO_IRP(icmd));
-	atomic_add_16(&ICMD_TO_IRP(icmd)->irp_nsa_elses_count, -1);
+	atomic_dec_16(&ICMD_TO_IRP(icmd)->irp_nsa_elses_count);
 	if (icmd->icmd_cmd->cmd_type == FCT_CMD_RCVD_ELS) {
 		op = ICMD_TO_ELS(icmd)->els_req_payload[0];
 		stmf_trace(iport->iport_alias, "Accepting RSCN %x (%s)",
@@ -2068,9 +2068,9 @@
 			fct_i_cmd_t *c = (*ppcmd)->icmd_next;
 
 			if ((*ppcmd)->icmd_flags & ICMD_SESSION_AFFECTING)
-				atomic_add_16(&irp->irp_sa_elses_count, -1);
+				atomic_dec_16(&irp->irp_sa_elses_count);
 			else
-				atomic_add_16(&irp->irp_nsa_elses_count, -1);
+				atomic_dec_16(&irp->irp_nsa_elses_count);
 			(*ppcmd)->icmd_next = cmd_to_abort;
 			cmd_to_abort = *ppcmd;
 			*ppcmd = c;
@@ -2125,7 +2125,7 @@
 		fct_local_port_t *port = iport->iport_port;
 
 		fct_dequeue_els(irp);
-		atomic_add_16(&irp->irp_nsa_elses_count, -1);
+		atomic_dec_16(&irp->irp_nsa_elses_count);
 		atomic_or_32(&icmd->icmd_flags, ICMD_KNOWN_TO_FCA);
 		if ((s = port->port_send_cmd(cmd)) != FCT_SUCCESS) {
 			atomic_and_32(&icmd->icmd_flags, ~ICMD_KNOWN_TO_FCA);
@@ -2179,7 +2179,7 @@
 		stmf_wwn_to_devid_desc((scsi_devid_desc_t *)irp->irp_id,
 		    irp->irp_rp->rp_pwwn, PROTOCOL_FIBRE_CHANNEL);
 		atomic_or_32(&irp->irp_flags, IRP_PLOGI_DONE);
-		atomic_add_32(&iport->iport_nrps_login, 1);
+		atomic_inc_32(&iport->iport_nrps_login);
 		if (irp->irp_deregister_timer) {
 			irp->irp_deregister_timer = 0;
 			irp->irp_dereg_count = 0;
@@ -2225,7 +2225,7 @@
 		iport->iport_cached_cmdlist = icmd->icmd_next;
 		iport->iport_cached_ncmds--;
 		mutex_exit(&iport->iport_cached_cmd_lock);
-		atomic_add_32(&iport->iport_total_alloced_ncmds, -1);
+		atomic_dec_32(&iport->iport_total_alloced_ncmds);
 		fct_free(icmd->icmd_cmd);
 	}
 	mutex_enter(&iport->iport_worker_lock);
@@ -2374,7 +2374,7 @@
 	rw_exit(&irp->irp_lock);
 	rw_exit(&iport->iport_lock);
 
-	atomic_add_16(&irp->irp_nonfcp_xchg_count, 1);
+	atomic_inc_16(&irp->irp_nonfcp_xchg_count);
 	atomic_or_32(&icmd->icmd_flags, ICMD_KNOWN_TO_FCA);
 	icmd->icmd_start_time = ddi_get_lbolt();
 	ret = iport->iport_port->port_send_cmd(cmd);
@@ -2763,7 +2763,7 @@
 	    fct_gid_cb);						\
 	if (ct_cmd) {							\
 		uint32_t cnt;						\
-		cnt = atomic_add_32_nv(&irp->irp_rscn_counter, 1);	\
+		cnt = atomic_inc_32_nv(&irp->irp_rscn_counter);	\
 		CMD_TO_ICMD(ct_cmd)->icmd_cb_private =			\
 		    INT2PTR(cnt, void *);				\
 		irp->irp_flags |= IRP_RSCN_QUEUED;			\
--- old/usr/src/uts/common/io/comstar/port/fct/fct.c	2014-07-28 07:44:32.859432750 -0400
+++ new/usr/src/uts/common/io/comstar/port/fct/fct.c	2014-07-28 07:44:32.865498062 -0400
@@ -1162,7 +1162,7 @@
 	stmf_wwn_to_devid_desc((scsi_devid_desc_t *)iport->iport_id,
 	    port->port_pwwn, PROTOCOL_FIBRE_CHANNEL);
 	(void) snprintf(taskq_name, sizeof (taskq_name), "stmf_fct_taskq_%d",
-	    atomic_add_32_nv(&taskq_cntr, 1));
+	    atomic_inc_32_nv(&taskq_cntr));
 	if ((iport->iport_worker_taskq = ddi_taskq_create(NULL,
 	    taskq_name, 1, TASKQ_DEFAULTPRI, 0)) == NULL) {
 		return (FCT_FAILURE);
@@ -1440,7 +1440,7 @@
 	while (irp_next != NULL) {
 		if (irp == irp_next) {
 			if (irp->irp_flags & IRP_PLOGI_DONE) {
-				atomic_add_32(&iport->iport_nrps_login, -1);
+				atomic_dec_32(&iport->iport_nrps_login);
 			}
 			atomic_and_32(&irp->irp_flags,
 			    ~(IRP_PLOGI_DONE | IRP_PRLI_DONE));
@@ -1678,7 +1678,7 @@
 		icmd = (fct_i_cmd_t *)cmd->cmd_fct_private;
 		icmd->icmd_next = NULL;
 		cmd->cmd_port = port;
-		atomic_add_32(&iport->iport_total_alloced_ncmds, 1);
+		atomic_inc_32(&iport->iport_total_alloced_ncmds);
 	}
 
 	/*
@@ -1701,7 +1701,7 @@
 		fct_cmd_free(cmd);
 		return (NULL);
 	}
-	atomic_add_16(&irp->irp_fcp_xchg_count, 1);
+	atomic_inc_16(&irp->irp_fcp_xchg_count);
 	cmd->cmd_rp = rp;
 	icmd->icmd_flags |= ICMD_IN_TRANSITION | ICMD_KNOWN_TO_FCA;
 	rw_exit(&irp->irp_lock);
@@ -1826,15 +1826,15 @@
 
 	rw_enter(&irp->irp_lock, RW_WRITER);
 	atomic_or_32(&icmd->icmd_flags, ICMD_IMPLICIT_CMD_HAS_RESOURCE);
-	atomic_add_16(&irp->irp_nonfcp_xchg_count, 1);
-	atomic_add_16(&irp->irp_sa_elses_count, 1);
+	atomic_inc_16(&irp->irp_nonfcp_xchg_count);
+	atomic_inc_16(&irp->irp_sa_elses_count);
 	/*
 	 * An implicit LOGO can also be posted to a irp where a PLOGI might
 	 * be in process. That PLOGI will reset this flag and decrement the
 	 * iport_nrps_login counter.
 	 */
 	if (irp->irp_flags & IRP_PLOGI_DONE) {
-		atomic_add_32(&iport->iport_nrps_login, -1);
+		atomic_dec_32(&iport->iport_nrps_login);
 	}
 	atomic_and_32(&irp->irp_flags, ~(IRP_PLOGI_DONE | IRP_PRLI_DONE));
 	atomic_or_32(&icmd->icmd_flags, ICMD_SESSION_AFFECTING);
@@ -1865,7 +1865,7 @@
 		new |= iport->iport_cmd_slots[cmd_slot].slot_next;
 	} while (atomic_cas_32(&iport->iport_next_free_slot, old, new) != old);
 
-	atomic_add_16(&iport->iport_nslots_free, -1);
+	atomic_dec_16(&iport->iport_nslots_free);
 	iport->iport_cmd_slots[cmd_slot].slot_cmd = icmd;
 	cmd->cmd_handle = (uint32_t)cmd_slot | 0x80000000 |
 	    (((uint32_t)(iport->iport_cmd_slots[cmd_slot].slot_uniq_cntr))
@@ -2072,14 +2072,14 @@
 		} while (atomic_cas_32(&iport->iport_next_free_slot,
 		    old, new) != old);
 		cmd->cmd_handle = 0;
-		atomic_add_16(&iport->iport_nslots_free, 1);
+		atomic_inc_16(&iport->iport_nslots_free);
 		if (cmd->cmd_rp) {
 			irp = (fct_i_remote_port_t *)
 			    cmd->cmd_rp->rp_fct_private;
 			if (cmd->cmd_type == FCT_CMD_FCP_XCHG)
-				atomic_add_16(&irp->irp_fcp_xchg_count, -1);
+				atomic_dec_16(&irp->irp_fcp_xchg_count);
 			else
-				atomic_add_16(&irp->irp_nonfcp_xchg_count, -1);
+				atomic_dec_16(&irp->irp_nonfcp_xchg_count);
 		}
 		rw_exit(&iport->iport_lock);
 	} else if ((icmd->icmd_flags & ICMD_IMPLICIT) &&
@@ -2089,9 +2089,9 @@
 			irp = (fct_i_remote_port_t *)
 			    cmd->cmd_rp->rp_fct_private;
 			if (cmd->cmd_type == FCT_CMD_FCP_XCHG)
-				atomic_add_16(&irp->irp_fcp_xchg_count, -1);
+				atomic_dec_16(&irp->irp_fcp_xchg_count);
 			else
-				atomic_add_16(&irp->irp_nonfcp_xchg_count, -1);
+				atomic_dec_16(&irp->irp_nonfcp_xchg_count);
 		}
 	}
 
@@ -2126,7 +2126,7 @@
 			iport->iport_cached_ncmds++;
 			mutex_exit(&iport->iport_cached_cmd_lock);
 		} else {
-			atomic_add_32(&iport->iport_total_alloced_ncmds, -1);
+			atomic_dec_32(&iport->iport_total_alloced_ncmds);
 			fct_free(cmd);
 		}
 	} else {
--- old/usr/src/uts/common/io/comstar/port/qlt/qlt.c	2014-07-28 07:44:33.153133727 -0400
+++ new/usr/src/uts/common/io/comstar/port/qlt/qlt.c	2014-07-28 07:44:33.159277824 -0400
@@ -1799,7 +1799,7 @@
 			    qlt->fw_length02) << 2);
 			qlt->fw_code01 = NULL;
 		} else {
-			atomic_add_32(&qlt_loaded_counter, 1);
+			atomic_inc_32(&qlt_loaded_counter);
 		}
 		qlt->fw_length01 = intp[3];
 		qlt->fw_code01 = (uint32_t *)kmem_alloc(iocd->stmf_ibuf_size,
@@ -1816,7 +1816,7 @@
 			kmem_free(qlt->fw_code01, (qlt->fw_length01 +
 			    qlt->fw_length02) << 2);
 			qlt->fw_code01 = NULL;
-			atomic_add_32(&qlt_loaded_counter, -1);
+			atomic_dec_32(&qlt_loaded_counter);
 		}
 		break;
 
@@ -4671,7 +4671,7 @@
 
 #ifdef DEBUG
 	if (qlt_drop_abort_counter > 0) {
-		if (atomic_add_32_nv(&qlt_drop_abort_counter, -1) == 1)
+		if (atomic_dec_32_nv(&qlt_drop_abort_counter) == 1)
 			return (FCT_SUCCESS);
 	}
 #endif
--- old/usr/src/uts/common/io/comstar/stmf/lun_map.c	2014-07-28 07:44:33.547691760 -0400
+++ new/usr/src/uts/common/io/comstar/stmf/lun_map.c	2014-07-28 07:44:33.553704924 -0400
@@ -267,7 +267,7 @@
 				}
 				ilu = (stmf_i_lu_t *)
 				    ent->ent_lu->lu_stmf_private;
-				atomic_add_32(&ilu->ilu_ref_cnt, -1);
+				atomic_dec_32(&ilu->ilu_ref_cnt);
 				kmem_free(sm->lm_plus[n],
 				    sizeof (stmf_lun_map_ent_t));
 			}
@@ -420,7 +420,7 @@
 	lun_map_ent->ent_lu = lu;
 	ret = stmf_add_ent_to_map(sm, (void *)lun_map_ent, lu_nbr);
 	ASSERT(ret == STMF_SUCCESS);
-	atomic_add_32(&ilu->ilu_ref_cnt, 1);
+	atomic_inc_32(&ilu->ilu_ref_cnt);
 	/*
 	 * do not set lun inventory flag for standby port
 	 * as this would be handled from peer
@@ -457,7 +457,7 @@
 
 	ret = stmf_remove_ent_from_map(sm, lu_nbr);
 	ASSERT(ret == STMF_SUCCESS);
-	atomic_add_32(&ilu->ilu_ref_cnt, -1);
+	atomic_dec_32(&ilu->ilu_ref_cnt);
 	iss->iss_flags |= ISS_LUN_INVENTORY_CHANGED;
 	if (lun_map_ent->ent_itl_datap) {
 		stmf_do_itl_dereg(lu, lun_map_ent->ent_itl_datap,
@@ -684,7 +684,7 @@
 		idlist->idl_tail->id_next = id;
 		idlist->idl_tail = id;
 	}
-	atomic_add_32(&idlist->id_count, 1);
+	atomic_inc_32(&idlist->id_count);
 }
 
 void
@@ -701,7 +701,7 @@
 	} else {
 		idlist->idl_head = id->id_next;
 	}
-	atomic_add_32(&idlist->id_count, -1);
+	atomic_dec_32(&idlist->id_count);
 }
 
 
--- old/usr/src/uts/common/io/comstar/stmf/stmf.c	2014-07-28 07:44:33.774574052 -0400
+++ new/usr/src/uts/common/io/comstar/stmf/stmf.c	2014-07-28 07:44:33.780865443 -0400
@@ -2094,7 +2094,7 @@
 			}
 			if (alua_state->alua_node != 0) {
 				ilport->ilport_rtpid =
-				    atomic_add_16_nv(&stmf_rtpid_counter, 1);
+				    atomic_inc_16_nv(&stmf_rtpid_counter);
 			}
 			lport = ilport->ilport_lport;
 			ic_reg_port = ic_reg_port_msg_alloc(
@@ -3253,7 +3253,7 @@
 	 * and ports that are alua participants (ilport_alua == 1)
 	 */
 	if (ilport->ilport_standby == 0) {
-		ilport->ilport_rtpid = atomic_add_16_nv(&stmf_rtpid_counter, 1);
+		ilport->ilport_rtpid = atomic_inc_16_nv(&stmf_rtpid_counter);
 	}
 
 	if (stmf_state.stmf_alua_state == 1 &&
@@ -3595,7 +3595,7 @@
 	mutex_exit(&stmf_state.stmf_lock);
 
 	iss->iss_creation_time = ddi_get_time();
-	ss->ss_session_id = atomic_add_64_nv(&stmf_session_counter, 1);
+	ss->ss_session_id = atomic_inc_64_nv(&stmf_session_counter);
 	iss->iss_flags &= ~ISS_BEING_CREATED;
 	/* XXX should we remove ISS_LUN_INVENTORY_CHANGED on new session? */
 	iss->iss_flags &= ~ISS_LUN_INVENTORY_CHANGED;
@@ -3794,7 +3794,7 @@
 
 	ASSERT(itl->itl_counter);
 
-	if (atomic_add_32_nv(&itl->itl_counter, -1))
+	if (atomic_dec_32_nv(&itl->itl_counter))
 		return;
 
 	stmf_release_itl_handle(lu, itl);
@@ -4152,12 +4152,12 @@
 	}
 
 	itask->itask_ilu_task_cntr = ilu->ilu_cur_task_cntr;
-	atomic_add_32(itask->itask_ilu_task_cntr, 1);
+	atomic_inc_32(itask->itask_ilu_task_cntr);
 	itask->itask_start_time = ddi_get_lbolt();
 
 	if ((lun_map_ent != NULL) && ((itask->itask_itl_datap =
 	    lun_map_ent->ent_itl_datap) != NULL)) {
-		atomic_add_32(&itask->itask_itl_datap->itl_counter, 1);
+		atomic_inc_32(&itask->itask_itl_datap->itl_counter);
 		task->task_lu_itl_handle = itask->itask_itl_datap->itl_handle;
 	} else {
 		itask->itask_itl_datap = NULL;
@@ -4185,7 +4185,7 @@
 	if (ilu->ilu_ntasks == ilu->ilu_ntasks_free)
 		cv_signal(&ilu->ilu_offline_pending_cv);
 	mutex_exit(&ilu->ilu_task_lock);
-	atomic_add_32(itask->itask_ilu_task_cntr, -1);
+	atomic_dec_32(itask->itask_ilu_task_cntr);
 }
 
 void
@@ -4408,8 +4408,8 @@
 	    hrtime_t,
 	    itask->itask_done_timestamp - itask->itask_start_timestamp);
 	if (itask->itask_itl_datap) {
-		if (atomic_add_32_nv(&itask->itask_itl_datap->itl_counter,
-		    -1) == 0) {
+		if (atomic_dec_32_nv(&itask->itask_itl_datap->itl_counter) ==
+		    0) {
 			stmf_release_itl_handle(task->task_lu,
 			    itask->itask_itl_datap);
 		}
@@ -4418,8 +4418,8 @@
 	rw_enter(iss->iss_lockp, RW_READER);
 	lport->lport_task_free(task);
 	if (itask->itask_worker) {
-		atomic_add_32(&stmf_cur_ntasks, -1);
-		atomic_add_32(&itask->itask_worker->worker_ref_count, -1);
+		atomic_dec_32(&stmf_cur_ntasks);
+		atomic_dec_32(&itask->itask_worker->worker_ref_count);
 	}
 	/*
 	 * After calling stmf_task_lu_free, the task pointer can no longer
@@ -4445,10 +4445,10 @@
 		task->task_max_nbufs = 4;
 	task->task_cur_nbufs = 0;
 	/* Latest value of currently running tasks */
-	ct = atomic_add_32_nv(&stmf_cur_ntasks, 1);
+	ct = atomic_inc_32_nv(&stmf_cur_ntasks);
 
 	/* Select the next worker using round robin */
-	nv = (int)atomic_add_32_nv((uint32_t *)&stmf_worker_sel_counter, 1);
+	nv = (int)atomic_inc_32_nv((uint32_t *)&stmf_worker_sel_counter);
 	if (nv >= stmf_nworkers_accepting_cmds) {
 		int s = nv;
 		do {
@@ -4525,7 +4525,7 @@
 	}
 	/* Measure task waitq time */
 	itask->itask_waitq_enter_timestamp = gethrtime();
-	atomic_add_32(&w->worker_ref_count, 1);
+	atomic_inc_32(&w->worker_ref_count);
 	itask->itask_cmd_stack[0] = ITASK_CMD_NEW_TASK;
 	itask->itask_ncmds = 1;
 	stmf_task_audit(itask, TE_TASK_START, CMD_OR_IOF_NA, dbuf);
@@ -4613,7 +4613,7 @@
 		return (STMF_ABORTED);
 #ifdef	DEBUG
 	if (!(ioflags & STMF_IOF_STATS_ONLY) && stmf_drop_buf_counter > 0) {
-		if (atomic_add_32_nv((uint32_t *)&stmf_drop_buf_counter, -1) ==
+		if (atomic_dec_32_nv((uint32_t *)&stmf_drop_buf_counter) ==
 		    1)
 			return (STMF_SUCCESS);
 	}
@@ -5710,7 +5710,7 @@
 
 	p = (uint8_t *)lu_id;
 
-	gen_number = atomic_add_16_nv(&stmf_lu_id_gen_number, 1);
+	gen_number = atomic_inc_16_nv(&stmf_lu_id_gen_number);
 
 	p[0] = 0xf1; p[1] = 3; p[2] = 0; p[3] = 0x10;
 	p[4] = ((company_id >> 20) & 0xf) | 0x60;
@@ -6342,9 +6342,8 @@
 			}
 #ifdef	DEBUG
 			if (stmf_drop_task_counter > 0) {
-				if (atomic_add_32_nv(
-				    (uint32_t *)&stmf_drop_task_counter,
-				    -1) == 1) {
+				if (atomic_dec_32_nv((uint32_t *)&stmf_drop_task_counter) ==
+				    1) {
 					break;
 				}
 			}
--- old/usr/src/uts/common/io/cxgbe/t4nex/t4_l2t.c	2014-07-28 07:44:34.229598243 -0400
+++ new/usr/src/uts/common/io/cxgbe/t4nex/t4_l2t.c	2014-07-28 07:44:34.235877704 -0400
@@ -422,7 +422,7 @@
 	mutex_exit(&e->lock);
 
 	d = container_of(e, struct l2t_data, l2tab[e->idx]);
-	atomic_add_int(&d->nfree, 1);
+	atomic_inc_uint(&d->nfree);
 
 }
 
--- old/usr/src/uts/common/io/dld/dld_str.c	2014-07-28 07:44:34.411956153 -0400
+++ new/usr/src/uts/common/io/dld/dld_str.c	2014-07-28 07:44:34.418156544 -0400
@@ -604,7 +604,7 @@
 	/*
 	 * Allocate an object from the cache.
 	 */
-	atomic_add_32(&str_count, 1);
+	atomic_inc_32(&str_count);
 	dsp = kmem_cache_alloc(str_cachep, KM_SLEEP);
 
 	/*
@@ -613,7 +613,7 @@
 	dsp->ds_tx_flow_mp = allocb(1, BPRI_HI);
 	if (dsp->ds_tx_flow_mp == NULL) {
 		kmem_cache_free(str_cachep, dsp);
-		atomic_add_32(&str_count, -1);
+		atomic_dec_32(&str_count);
 		return (NULL);
 	}
 	dsp->ds_type = type;
@@ -710,7 +710,7 @@
 	 * Free the object back to the cache.
 	 */
 	kmem_cache_free(str_cachep, dsp);
-	atomic_add_32(&str_count, -1);
+	atomic_dec_32(&str_count);
 }
 
 /*
--- old/usr/src/uts/common/io/dls/dls_link.c	2014-07-28 07:44:34.650430241 -0400
+++ new/usr/src/uts/common/io/dls/dls_link.c	2014-07-28 07:44:34.656385825 -0400
@@ -361,7 +361,7 @@
 
 		DLS_PREPARE_PKT(dlp->dl_mh, mp, &mhi, err);
 		if (err != 0) {
-			atomic_add_32(&(dlp->dl_unknowns), 1);
+			atomic_inc_32(&(dlp->dl_unknowns));
 			nextp = mp->b_next;
 			mp->b_next = NULL;
 			freemsg(mp);
@@ -535,7 +535,7 @@
 	}
 
 drop:
-	atomic_add_32(&dlp->dl_unknowns, 1);
+	atomic_inc_32(&dlp->dl_unknowns);
 	freemsg(mp);
 }
 
@@ -575,7 +575,7 @@
 	return;
 
 drop:
-	atomic_add_32(&dlp->dl_unknowns, 1);
+	atomic_inc_32(&dlp->dl_unknowns);
 	freemsg(mp);
 }
 
@@ -732,7 +732,7 @@
 	    (mod_hash_val_t)dlp);
 	ASSERT(err == 0);
 
-	atomic_add_32(&i_dls_link_count, 1);
+	atomic_inc_32(&i_dls_link_count);
 	ASSERT(i_dls_link_count != 0);
 
 done:
@@ -819,7 +819,7 @@
 		 */
 		i_dls_link_destroy(dlp);
 		ASSERT(i_dls_link_count > 0);
-		atomic_add_32(&i_dls_link_count, -1);
+		atomic_dec_32(&i_dls_link_count);
 	}
 }
 
--- old/usr/src/uts/common/io/drm/drm_atomic.h	2014-07-28 07:44:34.845516240 -0400
+++ new/usr/src/uts/common/io/drm/drm_atomic.h	2014-07-28 07:44:34.851492287 -0400
@@ -55,7 +55,7 @@
 
 #define	atomic_set(p, v)	(*(p) = (v))
 #define	atomic_read(p)		(*(p))
-#define	atomic_inc(p)		atomic_add_int(p, 1)
+#define	atomic_inc(p)		atomic_inc_uint(p)
 #define	atomic_dec(p)		atomic_dec_uint(p)
 #define	atomic_add(n, p)	atomic_add_int(p, n)
 #define	atomic_sub(n, p)	atomic_add_int(p, -n)
--- old/usr/src/uts/common/io/fcoe/fcoe.c	2014-07-28 07:44:35.012232447 -0400
+++ new/usr/src/uts/common/io/fcoe/fcoe.c	2014-07-28 07:44:35.018309972 -0400
@@ -1152,7 +1152,7 @@
 	fcoe_i_frame_t	*fmi;
 	int		ret;
 
-	atomic_add_32(&fcoe_nworkers_running, 1);
+	atomic_inc_32(&fcoe_nworkers_running);
 	mutex_enter(&w->worker_lock);
 	w->worker_flags |= FCOE_WORKER_STARTED | FCOE_WORKER_ACTIVE;
 	while ((w->worker_flags & FCOE_WORKER_TERMINATE) == 0) {
@@ -1181,7 +1181,7 @@
 	}
 	w->worker_flags &= ~(FCOE_WORKER_STARTED | FCOE_WORKER_ACTIVE);
 	mutex_exit(&w->worker_lock);
-	atomic_add_32(&fcoe_nworkers_running, -1);
+	atomic_dec_32(&fcoe_nworkers_running);
 	list_destroy(&w->worker_frm_list);
 }
 
--- old/usr/src/uts/common/io/fibre-channel/fca/emlxs/emlxs_sli3.c	2014-07-28 07:44:35.218736480 -0400
+++ new/usr/src/uts/common/io/fibre-channel/fca/emlxs/emlxs_sli3.c	2014-07-28 07:44:35.224918159 -0400
@@ -4808,7 +4808,7 @@
 			}
 #endif /* SFCT_SUPPORT */
 			cp->hbaCmplCmd_sbp++;
-			atomic_add_32(&hba->io_active, -1);
+			atomic_dec_32(&hba->io_active);
 
 			/* Copy entry to sbp's iocbq */
 			iocbq = &sbp->iocbq;
@@ -5218,7 +5218,7 @@
 		sbp->pkt_flags |= PACKET_IN_CHIPQ;
 		mutex_exit(&sbp->mtx);
 
-		atomic_add_32(&hba->io_active, 1);
+		atomic_inc_32(&hba->io_active);
 
 #ifdef SFCT_SUPPORT
 #ifdef FCT_IO_TRACE
--- old/usr/src/uts/common/io/fibre-channel/fca/emlxs/emlxs_sli4.c	2014-07-28 07:44:35.595193745 -0400
+++ new/usr/src/uts/common/io/fibre-channel/fca/emlxs/emlxs_sli4.c	2014-07-28 07:44:35.601438595 -0400
@@ -1991,7 +1991,7 @@
 			sbp->pkt_flags |= PACKET_IN_CHIPQ;
 			mutex_exit(&sbp->mtx);
 
-			atomic_add_32(&hba->io_active, 1);
+			atomic_inc_32(&hba->io_active);
 			sbp->xrip->flag |= EMLXS_XRI_PENDING_IO;
 		}
 
@@ -3869,7 +3869,7 @@
 #endif /* FCT_IO_TRACE */
 #endif /* SFCT_SUPPORT */
 
-		atomic_add_32(&hba->io_active, -1);
+		atomic_dec_32(&hba->io_active);
 
 		/* Copy entry to sbp's iocbq */
 		iocbq = &sbp->iocbq;
@@ -3963,7 +3963,7 @@
 
 	mutex_enter(&EMLXS_FCTAB_LOCK);
 	sbp = hba->fc_table[request_tag];
-	atomic_add_32(&hba->io_active, -1);
+	atomic_dec_32(&hba->io_active);
 
 	if (sbp == STALE_PACKET) {
 		cp->hbaCmplCmd_sbp++;
--- old/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei.c	2014-07-28 07:44:35.992970523 -0400
+++ new/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei.c	2014-07-28 07:44:35.999095778 -0400
@@ -773,7 +773,7 @@
 			break;
 
 		case AE_EVENT_PORT:
-			atomic_add_32(&ss->ss_port_event_counter, -1);
+			atomic_dec_32(&ss->ss_port_event_counter);
 			/* FALLTHROUGH */
 
 		case AE_EVENT_RESET:
--- old/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_eth.c	2014-07-28 07:44:36.192108274 -0400
+++ new/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_eth.c	2014-07-28 07:44:36.198100177 -0400
@@ -1385,6 +1385,6 @@
 		FCOEI_LOG(__FUNCTION__, "ss %p not bound now", ss);
 	}
 
-	atomic_add_32(&ss->ss_port_event_counter, -1);
+	atomic_dec_32(&ss->ss_port_event_counter);
 	kmem_free(ae, sizeof (fcoei_event_t));
 }
--- old/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_lv.c	2014-07-28 07:44:36.398464272 -0400
+++ new/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_lv.c	2014-07-28 07:44:36.404468754 -0400
@@ -860,7 +860,7 @@
 
 	bzero(frm->frm_payload, cmd_len);
 	xch->xch_cnt = xch->xch_ss->ss_sol_cnt;
-	atomic_add_32(xch->xch_cnt, 1);
+	atomic_inc_32(xch->xch_cnt);
 
 	FFM_R_CTL(fpkt->pkt_cmd_fhdr.r_ctl, frm);
 	FFM_D_ID(fpkt->pkt_cmd_fhdr.d_id, frm);
@@ -1056,7 +1056,7 @@
 	 * This will affect timing check
 	 */
 	xch->xch_cnt = xch->xch_ss->ss_sol_cnt;
-	atomic_add_32(xch->xch_cnt, 1);
+	atomic_inc_32(xch->xch_cnt);
 
 	/*
 	 * Set exchange residual bytes
@@ -1160,7 +1160,7 @@
 	 * This will affect timing check
 	 */
 	xch->xch_cnt = xch->xch_ss->ss_sol_cnt;
-	atomic_add_32(xch->xch_cnt, 1);
+	atomic_inc_32(xch->xch_cnt);
 
 	els_code = (ls_code_t *)(void *)fpkt->pkt_cmd;
 	switch (els_code->ls_code) {
@@ -1267,7 +1267,7 @@
 	 * This will affect timing check
 	 */
 	xch->xch_cnt = xch->xch_ss->ss_unsol_cnt;
-	atomic_add_32(xch->xch_cnt, 1);
+	atomic_inc_32(xch->xch_cnt);
 
 	/*
 	 * Set ifm_rctl
--- old/usr/src/uts/common/io/fibre-channel/fca/oce/oce_rx.c	2014-07-28 07:44:36.629643265 -0400
+++ new/usr/src/uts/common/io/fibre-channel/fca/oce/oce_rx.c	2014-07-28 07:44:36.635636354 -0400
@@ -226,7 +226,7 @@
 	rq->rqb_freelist[free_index] = rqbd;
 	rq->rqb_rc_head = GET_Q_NEXT(free_index, 1, rq->cfg.nbufs);
 	mutex_exit(&rq->rc_lock);
-	atomic_add_32(&rq->rqb_free, 1);
+	atomic_inc_32(&rq->rqb_free);
 } /* oce_rqb_free */
 
 
@@ -598,7 +598,7 @@
 	}
 
 	oce_rqb_free(rq, rqbd);
-	(void) atomic_add_32(&rq->pending, -1);
+	(void) atomic_dec_32(&rq->pending);
 } /* rx_pool_free */
 
 /*
--- old/usr/src/uts/common/io/fssnap.c	2014-07-28 07:44:36.813587797 -0400
+++ new/usr/src/uts/common/io/fssnap.c	2014-07-28 07:44:36.819708064 -0400
@@ -1544,9 +1544,9 @@
 		if (throttle_write) {
 			if (sema_tryp(&cmap->cmap_throttle_sem) == 0) {
 				rw_exit(&sidp->sid_rwlock);
-				atomic_add_32(&cmap->cmap_waiters, 1);
+				atomic_inc_32(&cmap->cmap_waiters);
 				sema_p(&cmap->cmap_throttle_sem);
-				atomic_add_32(&cmap->cmap_waiters, -1);
+				atomic_dec_32(&cmap->cmap_waiters);
 				rw_enter(&sidp->sid_rwlock, RW_READER);
 
 			/*
@@ -1680,7 +1680,7 @@
 	}
 	rw_exit(&sidp->sid_rwlock);
 
-	atomic_add_64((uint64_t *)&cmap->cmap_nchunks, 1);
+	atomic_inc_64((uint64_t *)&cmap->cmap_nchunks);
 
 	if ((cmap->cmap_maxsize != 0) &&
 	    ((cmap->cmap_nchunks * cmap->cmap_chunksz) > cmap->cmap_maxsize)) {
--- old/usr/src/uts/common/io/gld.c	2014-07-28 07:44:37.052935209 -0400
+++ new/usr/src/uts/common/io/gld.c	2014-07-28 07:44:37.059116756 -0400
@@ -1748,14 +1748,14 @@
 		 * Nonzero count delays any attempted DL_UNBIND.
 		 * See comments above gld_start().
 		 */
-		atomic_add_32((uint32_t *)&gld->gld_wput_count, 1);
+		atomic_inc_32((uint32_t *)&gld->gld_wput_count);
 		membar_enter();
 
 		/* Recheck state now wput_count is set to prevent DL_UNBIND */
 		/* If this Q is in process of DL_UNBIND, don't call start */
 		if (gld->gld_state != DL_IDLE || gld->gld_in_unbind) {
 			/* Extremely unlikely */
-			atomic_add_32((uint32_t *)&gld->gld_wput_count, -1);
+			atomic_dec_32((uint32_t *)&gld->gld_wput_count);
 			goto use_wsrv;
 		}
 
@@ -1771,7 +1771,7 @@
 
 		/* Allow DL_UNBIND again */
 		membar_exit();
-		atomic_add_32((uint32_t *)&gld->gld_wput_count, -1);
+		atomic_dec_32((uint32_t *)&gld->gld_wput_count);
 
 		if (rc == GLD_NORESOURCES)
 			qenable(q);
--- old/usr/src/uts/common/io/hxge/hxge_rxdma.c	2014-07-28 07:44:37.426184343 -0400
+++ new/usr/src/uts/common/io/hxge/hxge_rxdma.c	2014-07-28 07:44:37.432263178 -0400
@@ -1031,7 +1031,7 @@
 	 * is processing a loaned up buffer block.
 	 */
 	free_state = rx_msg_p->free;
-	ref_cnt = atomic_add_32_nv(&rx_msg_p->ref_cnt, -1);
+	ref_cnt = atomic_dec_32_nv(&rx_msg_p->ref_cnt);
 	if (!ref_cnt) {
 		atomic_dec_32(&hxge_mblks_pending);
 
--- old/usr/src/uts/common/io/ib/clients/daplt/daplt.c	2014-07-28 07:44:37.722714420 -0400
+++ new/usr/src/uts/common/io/ib/clients/daplt/daplt.c	2014-07-28 07:44:37.728993031 -0400
@@ -8293,13 +8293,13 @@
 			return (IBT_INSUFF_RESOURCE);
 		}
 		DAPLKA_RS_ACCT_INC(ep_rp, 1);
-		atomic_add_32(&hca_p->hca_qp_count, 1);
+		atomic_inc_32(&hca_p->hca_qp_count);
 	}
 	status = ibt_alloc_rc_channel(hca_hdl, flags, args, chan_hdl_p, sizes);
 
 	if (status != IBT_SUCCESS && acct_enabled) {
 		DAPLKA_RS_ACCT_DEC(ep_rp, 1);
-		atomic_add_32(&hca_p->hca_qp_count, -1);
+		atomic_dec_32(&hca_p->hca_qp_count);
 	}
 	return (status);
 }
@@ -8318,7 +8318,7 @@
 	}
 	if (DAPLKA_RS_ACCT_CHARGED(ep_rp) > 0) {
 		DAPLKA_RS_ACCT_DEC(ep_rp, 1);
-		atomic_add_32(&hca_p->hca_qp_count, -1);
+		atomic_dec_32(&hca_p->hca_qp_count);
 	}
 	return (status);
 }
@@ -8345,13 +8345,13 @@
 			return (IBT_INSUFF_RESOURCE);
 		}
 		DAPLKA_RS_ACCT_INC(evd_rp, 1);
-		atomic_add_32(&hca_p->hca_cq_count, 1);
+		atomic_inc_32(&hca_p->hca_cq_count);
 	}
 	status = ibt_alloc_cq(hca_hdl, cq_attr, ibt_cq_p, real_size);
 
 	if (status != IBT_SUCCESS && acct_enabled) {
 		DAPLKA_RS_ACCT_DEC(evd_rp, 1);
-		atomic_add_32(&hca_p->hca_cq_count, -1);
+		atomic_dec_32(&hca_p->hca_cq_count);
 	}
 	return (status);
 }
@@ -8370,7 +8370,7 @@
 	}
 	if (DAPLKA_RS_ACCT_CHARGED(evd_rp) > 0) {
 		DAPLKA_RS_ACCT_DEC(evd_rp, 1);
-		atomic_add_32(&hca_p->hca_cq_count, -1);
+		atomic_dec_32(&hca_p->hca_cq_count);
 	}
 	return (status);
 }
@@ -8397,13 +8397,13 @@
 			return (IBT_INSUFF_RESOURCE);
 		}
 		DAPLKA_RS_ACCT_INC(pd_rp, 1);
-		atomic_add_32(&hca_p->hca_pd_count, 1);
+		atomic_inc_32(&hca_p->hca_pd_count);
 	}
 	status = ibt_alloc_pd(hca_hdl, flags, pd_hdl_p);
 
 	if (status != IBT_SUCCESS && acct_enabled) {
 		DAPLKA_RS_ACCT_DEC(pd_rp, 1);
-		atomic_add_32(&hca_p->hca_pd_count, -1);
+		atomic_dec_32(&hca_p->hca_pd_count);
 	}
 	return (status);
 }
@@ -8423,7 +8423,7 @@
 	}
 	if (DAPLKA_RS_ACCT_CHARGED(pd_rp) > 0) {
 		DAPLKA_RS_ACCT_DEC(pd_rp, 1);
-		atomic_add_32(&hca_p->hca_pd_count, -1);
+		atomic_dec_32(&hca_p->hca_pd_count);
 	}
 	return (status);
 }
@@ -8451,13 +8451,13 @@
 			return (IBT_INSUFF_RESOURCE);
 		}
 		DAPLKA_RS_ACCT_INC(mw_rp, 1);
-		atomic_add_32(&hca_p->hca_mw_count, 1);
+		atomic_inc_32(&hca_p->hca_mw_count);
 	}
 	status = ibt_alloc_mw(hca_hdl, pd_hdl, flags, mw_hdl_p, rkey_p);
 
 	if (status != IBT_SUCCESS && acct_enabled) {
 		DAPLKA_RS_ACCT_DEC(mw_rp, 1);
-		atomic_add_32(&hca_p->hca_mw_count, -1);
+		atomic_dec_32(&hca_p->hca_mw_count);
 	}
 	return (status);
 }
@@ -8477,7 +8477,7 @@
 	}
 	if (DAPLKA_RS_ACCT_CHARGED(mw_rp) > 0) {
 		DAPLKA_RS_ACCT_DEC(mw_rp, 1);
-		atomic_add_32(&hca_p->hca_mw_count, -1);
+		atomic_dec_32(&hca_p->hca_mw_count);
 	}
 	return (status);
 }
@@ -8505,13 +8505,13 @@
 			return (IBT_INSUFF_RESOURCE);
 		}
 		DAPLKA_RS_ACCT_INC(mr_rp, 1);
-		atomic_add_32(&hca_p->hca_mr_count, 1);
+		atomic_inc_32(&hca_p->hca_mr_count);
 	}
 	status = ibt_register_mr(hca_hdl, pd_hdl, mr_attr, mr_hdl_p, mr_desc_p);
 
 	if (status != IBT_SUCCESS && acct_enabled) {
 		DAPLKA_RS_ACCT_DEC(mr_rp, 1);
-		atomic_add_32(&hca_p->hca_mr_count, -1);
+		atomic_dec_32(&hca_p->hca_mr_count);
 	}
 	return (status);
 }
@@ -8540,14 +8540,14 @@
 			return (IBT_INSUFF_RESOURCE);
 		}
 		DAPLKA_RS_ACCT_INC(mr_rp, 1);
-		atomic_add_32(&hca_p->hca_mr_count, 1);
+		atomic_inc_32(&hca_p->hca_mr_count);
 	}
 	status = ibt_register_shared_mr(hca_hdl, mr_hdl, pd_hdl,
 	    smr_attr_p, mr_hdl_p, mr_desc_p);
 
 	if (status != IBT_SUCCESS && acct_enabled) {
 		DAPLKA_RS_ACCT_DEC(mr_rp, 1);
-		atomic_add_32(&hca_p->hca_mr_count, -1);
+		atomic_dec_32(&hca_p->hca_mr_count);
 	}
 	return (status);
 }
@@ -8567,7 +8567,7 @@
 	}
 	if (DAPLKA_RS_ACCT_CHARGED(mr_rp) > 0) {
 		DAPLKA_RS_ACCT_DEC(mr_rp, 1);
-		atomic_add_32(&hca_p->hca_mr_count, -1);
+		atomic_dec_32(&hca_p->hca_mr_count);
 	}
 	return (status);
 }
@@ -8595,13 +8595,13 @@
 			return (IBT_INSUFF_RESOURCE);
 		}
 		DAPLKA_RS_ACCT_INC(srq_rp, 1);
-		atomic_add_32(&hca_p->hca_srq_count, 1);
+		atomic_inc_32(&hca_p->hca_srq_count);
 	}
 	status = ibt_alloc_srq(hca_hdl, flags, pd, reqsz, srq_hdl_p, realsz);
 
 	if (status != IBT_SUCCESS && acct_enabled) {
 		DAPLKA_RS_ACCT_DEC(srq_rp, 1);
-		atomic_add_32(&hca_p->hca_srq_count, -1);
+		atomic_dec_32(&hca_p->hca_srq_count);
 	}
 	return (status);
 }
@@ -8622,7 +8622,7 @@
 	}
 	if (DAPLKA_RS_ACCT_CHARGED(srq_rp) > 0) {
 		DAPLKA_RS_ACCT_DEC(srq_rp, 1);
-		atomic_add_32(&hca_p->hca_srq_count, -1);
+		atomic_dec_32(&hca_p->hca_srq_count);
 	}
 	return (status);
 }
@@ -9035,7 +9035,7 @@
 		return (EINVAL);
 	}
 	D2("daplka_close: closing rnum = %d\n", rnum);
-	atomic_add_32(&daplka_pending_close, 1);
+	atomic_inc_32(&daplka_pending_close);
 
 	/*
 	 * remove from resource table.
@@ -9048,7 +9048,7 @@
 	if (ia_rp != NULL) {
 		DAPLKA_RS_UNREF(ia_rp);
 	}
-	atomic_add_32(&daplka_pending_close, -1);
+	atomic_dec_32(&daplka_pending_close);
 	return (DDI_SUCCESS);
 }
 
@@ -9846,7 +9846,7 @@
 	uint32_t new_hkey;
 
 	do {
-		new_hkey = atomic_add_32_nv(&daplka_timer_hkey, 1);
+		new_hkey = atomic_inc_32_nv(&daplka_timer_hkey);
 	} while (new_hkey == 0);
 
 	return (new_hkey);
--- old/usr/src/uts/common/io/ib/clients/ibd/ibd_cm.c	2014-07-28 07:44:38.219293301 -0400
+++ new/usr/src/uts/common/io/ib/clients/ibd/ibd_cm.c	2014-07-28 07:44:38.225430104 -0400
@@ -1236,7 +1236,7 @@
 	 * the corresponding ibd_rc_process_rx() is called.
 	 */
 	ASSERT(state->rc_srq_rwqe_list.dl_cnt < state->rc_srq_size);
-	atomic_add_32(&state->rc_srq_rwqe_list.dl_cnt, 1);
+	atomic_inc_32(&state->rc_srq_rwqe_list.dl_cnt);
 	if (ibt_post_srq(state->rc_srq_hdl, &rwqe->w_rwr, 1, NULL) !=
 	    IBT_SUCCESS) {
 		atomic_dec_32(&state->rc_srq_rwqe_list.dl_cnt);
@@ -1258,7 +1258,7 @@
 	 * have to make sure dl_cnt has already updated before
 	 * corresponding ibd_rc_process_rx() is called.
 	 */
-	atomic_add_32(&chan->rx_wqe_list.dl_cnt, 1);
+	atomic_inc_32(&chan->rx_wqe_list.dl_cnt);
 	if (ibt_post_recv(chan->chan_hdl, &rwqe->w_rwr, 1, NULL) !=
 	    IBT_SUCCESS) {
 		atomic_dec_32(&chan->rx_wqe_list.dl_cnt);
@@ -1499,11 +1499,10 @@
 		 * network layer
 		 */
 		if (state->rc_enable_srq) {
-			atomic_add_32(&state->rc_srq_rwqe_list.
-			    dl_bufs_outstanding, 1);
+			atomic_inc_32(
+			    &state->rc_srq_rwqe_list.dl_bufs_outstanding);
 		} else {
-			atomic_add_32(&chan->rx_wqe_list.
-			    dl_bufs_outstanding, 1);
+			atomic_inc_32(&chan->rx_wqe_list.dl_bufs_outstanding);
 		}
 		mp = rwqe->rwqe_im_mblk;
 	} else {
@@ -1669,7 +1668,7 @@
 		ibd_rc_free_rwqe(chan, rwqe);
 		return;
 	}
-	atomic_add_32(&chan->rx_wqe_list.dl_bufs_outstanding, -1);
+	atomic_dec_32(&chan->rx_wqe_list.dl_bufs_outstanding);
 }
 
 /*
--- old/usr/src/uts/common/io/ib/clients/rdsv3/cong.c	2014-07-28 07:44:38.500103234 -0400
+++ new/usr/src/uts/common/io/ib/clients/rdsv3/cong.c	2014-07-28 07:44:38.506088303 -0400
@@ -259,7 +259,7 @@
 	    map, NIPQUAD(map->m_addr));
 
 	rdsv3_stats_inc(s_cong_update_received);
-	atomic_add_32(&rdsv3_cong_generation, 1);
+	atomic_inc_32(&rdsv3_cong_generation);
 #if 0
 XXX
 	if (waitqueue_active(&map->m_waitq))
--- old/usr/src/uts/common/io/ib/clients/rdsv3/ib_recv.c	2014-07-28 07:44:38.677435864 -0400
+++ new/usr/src/uts/common/io/ib/clients/rdsv3/ib_recv.c	2014-07-28 07:44:38.683551319 -0400
@@ -129,7 +129,7 @@
 		recv->r_ibinc = kmem_cache_alloc(rdsv3_ib_incoming_slab,
 		    KM_NOSLEEP);
 		if (recv->r_ibinc == NULL) {
-			atomic_add_32(&rdsv3_ib_allocation, -1);
+			atomic_dec_32(&rdsv3_ib_allocation);
 			goto out;
 		}
 		rdsv3_inc_init(&recv->r_ibinc->ii_inc, conn, conn->c_faddr);
@@ -154,7 +154,7 @@
 out:
 	if (recv->r_ibinc) {
 		kmem_cache_free(rdsv3_ib_incoming_slab, recv->r_ibinc);
-		atomic_add_32(&rdsv3_ib_allocation, -1);
+		atomic_dec_32(&rdsv3_ib_allocation);
 		recv->r_ibinc = NULL;
 	}
 	return (-ENOMEM);
--- old/usr/src/uts/common/io/ib/clients/rdsv3/message.c	2014-07-28 07:44:38.870815735 -0400
+++ new/usr/src/uts/common/io/ib/clients/rdsv3/message.c	2014-07-28 07:44:38.876795965 -0400
@@ -68,7 +68,7 @@
 {
 	RDSV3_DPRINTF5("rdsv3_message_addref", "addref rm %p ref %d",
 	    rm, atomic_get(&rm->m_refcount));
-	atomic_add_32(&rm->m_refcount, 1);
+	atomic_inc_32(&rm->m_refcount);
 }
 
 /*
--- old/usr/src/uts/common/io/ib/clients/rdsv3/rdma.c	2014-07-28 07:44:39.052984888 -0400
+++ new/usr/src/uts/common/io/ib/clients/rdsv3/rdma.c	2014-07-28 07:44:39.062674379 -0400
@@ -91,7 +91,7 @@
 	mr = avl_find(root, &key, &where);
 	if ((mr == NULL) && (insert != NULL)) {
 		avl_insert(root, (void *)insert, where);
-		atomic_add_32(&insert->r_refcount, 1);
+		atomic_inc_32(&insert->r_refcount);
 		return (NULL);
 	}
 
@@ -254,7 +254,7 @@
 	ASSERT(!(found && found != mr));
 
 	if (mr_ret) {
-		atomic_add_32(&mr->r_refcount, 1);
+		atomic_inc_32(&mr->r_refcount);
 		*mr_ret = mr;
 	}
 
@@ -399,7 +399,7 @@
 		RB_CLEAR_NODE(&mr->r_rb_node);
 		zot_me = 1;
 	} else {
-		atomic_add_32(&mr->r_refcount, 1);
+		atomic_inc_32(&mr->r_refcount);
 	}
 	mutex_exit(&rs->rs_rdma_lock);
 
@@ -638,7 +638,7 @@
 	if (!mr)
 		err = -EINVAL;	/* invalid r_key */
 	else
-		atomic_add_32(&mr->r_refcount, 1);
+		atomic_inc_32(&mr->r_refcount);
 	mutex_exit(&rs->rs_rdma_lock);
 
 	if (mr) {
--- old/usr/src/uts/common/io/ib/clients/rdsv3/rds_recv.c	2014-07-28 07:44:39.246036306 -0400
+++ new/usr/src/uts/common/io/ib/clients/rdsv3/rds_recv.c	2014-07-28 07:44:39.252091345 -0400
@@ -64,7 +64,7 @@
 {
 	RDSV3_DPRINTF4("rdsv3_inc_addref",
 	    "addref inc %p ref %d", inc, atomic_get(&inc->i_refcount));
-	atomic_add_32(&inc->i_refcount, 1);
+	atomic_inc_32(&inc->i_refcount);
 }
 
 void
--- old/usr/src/uts/common/io/ib/clients/rdsv3/send.c	2014-07-28 07:44:39.431969034 -0400
+++ new/usr/src/uts/common/io/ib/clients/rdsv3/send.c	2014-07-28 07:44:39.438334247 -0400
@@ -176,7 +176,7 @@
 		ret = -ENOMEM;
 		goto out;
 	}
-	atomic_add_32(&conn->c_senders, 1);
+	atomic_inc_32(&conn->c_senders);
 
 	if (conn->c_trans->xmit_prepare)
 		conn->c_trans->xmit_prepare(conn);
@@ -567,7 +567,7 @@
 
 	RDSV3_FOR_EACH_LIST_NODE_SAFE(rm, tmp, &conn->c_retrans, m_conn_item) {
 		if (rm->m_rdma_op == op) {
-			atomic_add_32(&rm->m_refcount, 1);
+			atomic_inc_32(&rm->m_refcount);
 			found = rm;
 			goto out;
 		}
@@ -576,7 +576,7 @@
 	RDSV3_FOR_EACH_LIST_NODE_SAFE(rm, tmp, &conn->c_send_queue,
 	    m_conn_item) {
 		if (rm->m_rdma_op == op) {
-			atomic_add_32(&rm->m_refcount, 1);
+			atomic_inc_32(&rm->m_refcount);
 			found = rm;
 			break;
 		}
--- old/usr/src/uts/common/io/mac/mac.c	2014-07-28 07:44:39.639073584 -0400
+++ new/usr/src/uts/common/io/mac/mac.c	2014-07-28 07:44:39.645381623 -0400
@@ -2255,7 +2255,7 @@
 	/*
 	 * Grab a value from the arena.
 	 */
-	atomic_add_32(&minor_count, 1);
+	atomic_inc_32(&minor_count);
 
 	if (sleep)
 		minor = (uint_t)id_alloc(minor_ids);
@@ -2263,7 +2263,7 @@
 		minor = (uint_t)id_alloc_nosleep(minor_ids);
 
 	if (minor == 0) {
-		atomic_add_32(&minor_count, -1);
+		atomic_dec_32(&minor_count);
 		return (0);
 	}
 
@@ -2280,7 +2280,7 @@
 	 * Return the value to the arena.
 	 */
 	id_free(minor_ids, minor);
-	atomic_add_32(&minor_count, -1);
+	atomic_dec_32(&minor_count);
 }
 
 uint32_t
--- old/usr/src/uts/common/io/mac/mac_bcast.c	2014-07-28 07:44:40.065556948 -0400
+++ new/usr/src/uts/common/io/mac/mac_bcast.c	2014-07-28 07:44:40.071640259 -0400
@@ -373,7 +373,7 @@
 			flow_desc.fd_mask |= FLOW_LINK_VID;
 		}
 
-		grp->mbg_id = atomic_add_32_nv(&mac_bcast_id, 1);
+		grp->mbg_id = atomic_inc_32_nv(&mac_bcast_id);
 		(void) sprintf(flow_name,
 		    "mac/%s/mcast%d", mip->mi_name, grp->mbg_id);
 
--- old/usr/src/uts/common/io/mega_sas/megaraid_sas.c	2014-07-28 07:44:40.254875519 -0400
+++ new/usr/src/uts/common/io/mega_sas/megaraid_sas.c	2014-07-28 07:44:40.261278779 -0400
@@ -4565,7 +4565,7 @@
 static void
 issue_cmd_xscale(struct megasas_cmd *cmd, struct megasas_instance *instance)
 {
-	atomic_add_16(&instance->fw_outstanding, 1);
+	atomic_inc_16(&instance->fw_outstanding);
 
 	/* Issue the command to the FW */
 	WR_IB_QPORT((host_to_le32(cmd->frame_phys_addr) >> 3) |
@@ -4575,7 +4575,7 @@
 static void
 issue_cmd_ppc(struct megasas_cmd *cmd, struct megasas_instance *instance)
 {
-	atomic_add_16(&instance->fw_outstanding, 1);
+	atomic_inc_16(&instance->fw_outstanding);
 
 	/* Issue the command to the FW */
 	WR_IB_QPORT((host_to_le32(cmd->frame_phys_addr)) |
--- old/usr/src/uts/common/io/mr_sas/mr_sas.c	2014-07-28 07:44:40.582319893 -0400
+++ new/usr/src/uts/common/io/mr_sas/mr_sas.c	2014-07-28 07:44:40.588489127 -0400
@@ -6734,7 +6734,7 @@
 issue_cmd_ppc(struct mrsas_cmd *cmd, struct mrsas_instance *instance)
 {
 	struct scsi_pkt *pkt;
-	atomic_add_16(&instance->fw_outstanding, 1);
+	atomic_inc_16(&instance->fw_outstanding);
 
 	pkt = cmd->pkt;
 	if (pkt) {
--- old/usr/src/uts/common/io/mr_sas/mr_sas_tbolt.c	2014-07-28 07:44:41.002090379 -0400
+++ new/usr/src/uts/common/io/mr_sas/mr_sas_tbolt.c	2014-07-28 07:44:41.008162308 -0400
@@ -1894,7 +1894,7 @@
 tbolt_issue_cmd(struct mrsas_cmd *cmd, struct mrsas_instance *instance)
 {
 	MRSAS_REQUEST_DESCRIPTOR_UNION *req_desc = cmd->request_desc;
-	atomic_add_16(&instance->fw_outstanding, 1);
+	atomic_inc_16(&instance->fw_outstanding);
 
 	struct scsi_pkt *pkt;
 
--- old/usr/src/uts/common/io/myri10ge/drv/myri10ge.c	2014-07-28 07:44:41.294629966 -0400
+++ new/usr/src/uts/common/io/myri10ge/drv/myri10ge.c	2014-07-28 07:44:41.300907061 -0400
@@ -3132,7 +3132,7 @@
 	/* check to see if the slots are really there */
 	avail = tx->mask - (tx->req - tx->done);
 	if (unlikely(avail <=  MYRI10GE_MAX_SEND_DESC_TSO)) {
-		atomic_add_32(&tx->stall, 1);
+		atomic_inc_32(&tx->stall);
 		mutex_exit(&tx->lock);
 		return (EBUSY);
 	}
@@ -3373,7 +3373,7 @@
 
 	if (avail < max_segs) {
 		err = EBUSY;
-		atomic_add_32(&tx->stall_early, 1);
+		atomic_inc_32(&tx->stall_early);
 		goto stall;
 	}
 
@@ -3638,7 +3638,7 @@
 
 late_stall:
 	try_pullup = 0;
-	atomic_add_32(&tx->stall_late, 1);
+	atomic_inc_32(&tx->stall_late);
 
 abort_with_handles:
 	/* unbind and free handles from previous mblks */
@@ -3671,7 +3671,7 @@
 stall:
 	if (err != 0) {
 		if (err == EBUSY) {
-			atomic_add_32(&tx->stall, 1);
+			atomic_inc_32(&tx->stall);
 		} else {
 			MYRI10GE_ATOMIC_SLICE_STAT_INC(xmit_err);
 		}
--- old/usr/src/uts/common/io/myri10ge/drv/myri10ge_var.h	2014-07-28 07:44:41.661133011 -0400
+++ new/usr/src/uts/common/io/myri10ge/drv/myri10ge_var.h	2014-07-28 07:44:41.667103589 -0400
@@ -291,11 +291,11 @@
 #define	MYRI10GE_SLICE_STAT_DEC(field)					\
 (((struct myri10ge_slice_stat *)ss->ksp_stat->ks_data)->field.value.ul)--
 #define	MYRI10GE_ATOMIC_SLICE_STAT_INC(field) 				\
-atomic_add_long(&(((struct myri10ge_slice_stat *)			\
-	    ss->ksp_stat->ks_data)->field.value.ul), 1)
+atomic_inc_ulong(&(((struct myri10ge_slice_stat *)			\
+	ss->ksp_stat->ks_data)->field.value.ul))
 #define	MYRI10GE_ATOMIC_SLICE_STAT_DEC(field) 				\
-atomic_add_long(&(((struct myri10ge_slice_stat *)			\
-	    ss->ksp_stat->ks_data)->field.value.ul), -1)
+atomic_dec_ulong(&(((struct myri10ge_slice_stat *)			\
+	ss->ksp_stat->ks_data)->field.value.ul))
 #define	MYRI10GE_SLICE_STAT(field)					\
 (((struct myri10ge_slice_stat *)ss->ksp_stat->ks_data)->field.value.ul)
 
--- old/usr/src/uts/common/io/neti_impl.c	2014-07-28 07:44:41.839609310 -0400
+++ new/usr/src/uts/common/io/neti_impl.c	2014-07-28 07:44:41.845602092 -0400
@@ -134,7 +134,7 @@
 	mutex_enter(&nts->nts_lock);
 	nd = net_find(protocol, nts);
 	if (nd != NULL)
-		atomic_add_32((uint_t *)&nd->netd_refcnt, 1);
+		atomic_inc_32((uint_t *)&nd->netd_refcnt);
 	mutex_exit(&nts->nts_lock);
 	return (nd);
 }
@@ -157,7 +157,7 @@
 	 * removed from the nts_netd_head list on the neti_stack_t from a
 	 * call to net_protocol_unregister already, so it is thus an orphan.
 	 */
-	if (atomic_add_32_nv((uint_t *)&info->netd_refcnt, -1) == 0) {
+	if (atomic_dec_32_nv((uint_t *)&info->netd_refcnt) == 0) {
 		ASSERT(info->netd_hooks == NULL);
 		ASSERT(info->netd_stack == NULL);
 		kmem_free(info, sizeof (struct net_data));
@@ -201,7 +201,7 @@
 		(void) net_protocol_release(info);
 
 	if (n != NULL)
-		atomic_add_32((uint_t *)&n->netd_refcnt, 1);
+		atomic_inc_32((uint_t *)&n->netd_refcnt);
 
 	mutex_exit(&nts->nts_lock);
 
--- old/usr/src/uts/common/io/nxge/nxge_rxdma.c	2014-07-28 07:44:42.025326374 -0400
+++ new/usr/src/uts/common/io/nxge/nxge_rxdma.c	2014-07-28 07:44:42.031810090 -0400
@@ -1684,7 +1684,7 @@
 	 * is processing a loaned up buffer block.
 	 */
 	free_state = rx_msg_p->free;
-	ref_cnt = atomic_add_32_nv(&rx_msg_p->ref_cnt, -1);
+	ref_cnt = atomic_dec_32_nv(&rx_msg_p->ref_cnt);
 	if (!ref_cnt) {
 		atomic_dec_32(&nxge_mblks_pending);
 		buffer = rx_msg_p->buffer;
--- old/usr/src/uts/common/io/pciex/pcie_fault.c	2014-07-28 07:44:42.355332622 -0400
+++ new/usr/src/uts/common/io/pciex/pcie_fault.c	2014-07-28 07:44:42.361355153 -0400
@@ -2629,7 +2629,7 @@
 
 	*eqep = errorq_reserve(fmhdl->fh_errorq);
 	if (*eqep == NULL) {
-		atomic_add_64(&fmhdl->fh_kstat.fek_erpt_dropped.value.ui64, 1);
+		atomic_inc_64(&fmhdl->fh_kstat.fek_erpt_dropped.value.ui64);
 		return (DDI_FAILURE);
 	}
 
--- old/usr/src/uts/common/io/rsm/rsm.c	2014-07-28 07:44:42.624647498 -0400
+++ new/usr/src/uts/common/io/rsm/rsm.c	2014-07-28 07:44:42.630982015 -0400
@@ -4043,7 +4043,7 @@
 				seg = (rsmseg_t *)p;
 				rsmseglock_acquire(seg);
 
-				atomic_add_32(&seg->s_pollevent, 1);
+				atomic_inc_32(&seg->s_pollevent);
 
 				if (seg->s_pollflag & RSM_SEGMENT_POLL)
 					pollwakeup(&seg->s_poll, POLLRDNORM);
@@ -4064,7 +4064,7 @@
 
 		ASSERT(rsmseglock_held(seg));
 
-		atomic_add_32(&seg->s_pollevent, 1);
+		atomic_inc_32(&seg->s_pollevent);
 
 		/*
 		 * We must hold the segment lock here, or else the segment
@@ -5502,7 +5502,7 @@
 			    e, no_reply_cnt));
 			ASSERT(e != RSMERR_QUEUE_FENCE_UP &&
 			    e != RSMERR_BAD_BARRIER_HNDL);
-			atomic_add_64(&rsm_ipcsend_errcnt, 1);
+			atomic_inc_64(&rsm_ipcsend_errcnt);
 			goto again;
 		} else {
 			DBG_PRINTF((category, RSM_DEBUG_VERBOSE,
@@ -5533,7 +5533,7 @@
 			DBG_PRINTF((category, RSM_ERR,
 			    "rsm: rsmipc_send reply send"
 			    " err = %d\n", e));
-			atomic_add_64(&rsm_ipcsend_errcnt, 1);
+			atomic_inc_64(&rsm_ipcsend_errcnt);
 			goto again;
 		} else {
 			DBG_PRINTF((category, RSM_DEBUG_VERBOSE,
@@ -5639,7 +5639,7 @@
 			RSMIPC_CLEAR(rslot, RSMIPC_PENDING);
 			rsmipc_free(rslot);
 			rele_sendq_token(sendq_token);
-			atomic_add_64(&rsm_ipcsend_errcnt, 1);
+			atomic_inc_64(&rsm_ipcsend_errcnt);
 			goto again;
 		}
 
@@ -5935,7 +5935,7 @@
 			break;
 		}
 		/* error counter for statistics */
-		atomic_add_64(&rsm_ctrlmsg_errcnt, 1);
+		atomic_inc_64(&rsm_ctrlmsg_errcnt);
 
 		DBG_PRINTF((category, RSM_ERR,
 		    "rsmipc_send_controlmsg:rsm_send error=%d", e));
@@ -6449,7 +6449,7 @@
 	seg->s_flags &= ~RSM_IMPORT_DUMMY;	/* clear dummy flag */
 	if (bar_va) {
 		/* increment generation number on barrier page */
-		atomic_add_16(bar_va + seg->s_hdr.rsmrc_num, 1);
+		atomic_inc_16(bar_va + seg->s_hdr.rsmrc_num);
 		/* return user off into barrier page where status will be */
 		msg->off = (int)seg->s_hdr.rsmrc_num;
 		msg->gnum = bar_va[msg->off]; 	/* gnum race */
@@ -6685,7 +6685,7 @@
 
 	/* increment generation number on barrier page */
 	if (bar_va) {
-		atomic_add_16(bar_va + seg->s_hdr.rsmrc_num, 1);
+		atomic_inc_16(bar_va + seg->s_hdr.rsmrc_num);
 	}
 
 	/*
@@ -7284,7 +7284,7 @@
 			    seg));
 			if (seg->s_pollevent) {
 				/* consume the event */
-				atomic_add_32(&seg->s_pollevent, -1);
+				atomic_dec_32(&seg->s_pollevent);
 				event_list[i].revent = POLLRDNORM;
 			}
 			rsmseglock_release(seg);
--- old/usr/src/uts/common/io/str_conf.c	2014-07-28 07:44:43.103764520 -0400
+++ new/usr/src/uts/common/io/str_conf.c	2014-07-28 07:44:43.109708123 -0400
@@ -24,8 +24,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -284,7 +282,7 @@
 	rw_enter(&fmodsw_lock, RW_READER);
 	if (i_fmodsw_hash_find(name, &fp) == 0) {
 		if (flags & FMODSW_HOLD) {
-			atomic_add_32(&(fp->f_ref), 1);	/* lock must be held */
+			atomic_inc_32(&(fp->f_ref));	/* lock must be held */
 			ASSERT(fp->f_ref > 0);
 		}
 
@@ -308,5 +306,5 @@
 fmodsw_rele(fmodsw_impl_t *fp)
 {
 	ASSERT(fp->f_ref > 0);
-	atomic_add_32(&(fp->f_ref), -1);
+	atomic_dec_32(&(fp->f_ref));
 }
--- old/usr/src/uts/common/io/tl.c	2014-07-28 07:44:43.277047490 -0400
+++ new/usr/src/uts/common/io/tl.c	2014-07-28 07:44:43.283249958 -0400
@@ -1138,7 +1138,7 @@
 static void
 tl_refhold(tl_endpt_t *tep)
 {
-	atomic_add_32(&tep->te_refcnt, 1);
+	atomic_inc_32(&tep->te_refcnt);
 }
 
 static void
@@ -1146,7 +1146,7 @@
 {
 	ASSERT(tep->te_refcnt != 0);
 
-	if (atomic_add_32_nv(&tep->te_refcnt, -1) == 0)
+	if (atomic_dec_32_nv(&tep->te_refcnt) == 0)
 		tl_free(tep);
 }
 
@@ -1264,13 +1264,13 @@
 static void
 tl_serializer_refhold(tl_serializer_t *s)
 {
-	atomic_add_32(&s->ts_refcnt, 1);
+	atomic_inc_32(&s->ts_refcnt);
 }
 
 static void
 tl_serializer_refrele(tl_serializer_t *s)
 {
-	if (atomic_add_32_nv(&s->ts_refcnt, -1) == 0) {
+	if (atomic_dec_32_nv(&s->ts_refcnt) == 0) {
 		serializer_destroy(s->ts_serializer);
 		kmem_free(s, sizeof (tl_serializer_t));
 	}
@@ -5426,7 +5426,7 @@
 		 * Use default address.
 		 */
 		bcopy(&tep->te_defaddr, tep->te_abuf, sizeof (uint32_t));
-		atomic_add_32(&tep->te_defaddr, 1);
+		atomic_inc_32(&tep->te_defaddr);
 	}
 
 	/*
--- old/usr/src/uts/common/io/usb/usba/usbai_pipe_mgmt.c	2014-07-28 07:44:43.650680930 -0400
+++ new/usr/src/uts/common/io/usb/usba/usbai_pipe_mgmt.c	2014-07-28 07:44:43.656687822 -0400
@@ -458,7 +458,7 @@
 		    "USB_%s_%x_pipehndl_tq_%d",
 		    ddi_driver_name(dip), ep->bEndpointAddress, instance);
 	} else {
-		def_instance = atomic_add_32_nv(&anon_instance, 1);
+		def_instance = atomic_inc_32_nv(&anon_instance);
 
 		(void) snprintf(tq_name, sizeof (tq_name),
 		    "USB_%s_%x_pipehndl_tq_%d_",
--- old/usr/src/uts/common/io/xge/drv/xgell.c	2014-07-28 07:44:43.873409111 -0400
+++ new/usr/src/uts/common/io/xge/drv/xgell.c	2014-07-28 07:44:43.879492240 -0400
@@ -1180,7 +1180,7 @@
 	xge_hal_fifo_dtr_post(ring->channelh, dtr);
 
 	/* Update per-ring tx statistics */
-	atomic_add_64(&ring->tx_pkts, 1);
+	atomic_inc_64(&ring->tx_pkts);
 	atomic_add_64(&ring->tx_bytes, sent_bytes);
 
 	return (NULL);
--- old/usr/src/uts/common/ipp/dlcosmk/dlcosmk.c	2014-07-28 07:44:44.141414415 -0400
+++ new/usr/src/uts/common/ipp/dlcosmk/dlcosmk.c	2014-07-28 07:44:44.147395336 -0400
@@ -66,14 +66,14 @@
 	if (mp->b_datap->db_type != M_DATA) {
 		if ((mp->b_cont == NULL) ||
 		    (mp->b_cont->b_datap->db_type != M_DATA)) {
-			atomic_add_64(&dlcosmk_data->epackets, 1);
+			atomic_inc_64(&dlcosmk_data->epackets);
 			dlcosmk0dbg(("dlcosmk_process: no data\n"));
 			return (EINVAL);
 		}
 	}
 
 	/* Update global stats */
-	atomic_add_64(&dlcosmk_data->npackets, 1);
+	atomic_inc_64(&dlcosmk_data->npackets);
 
 	/*
 	 * This should only be called for outgoing packets. For inbound, just
@@ -81,7 +81,7 @@
 	 */
 	if ((proc == IPP_LOCAL_IN) || (proc == IPP_FWD_IN)) {
 		dlcosmk2dbg(("dlcosmk_process:cannot mark incoming packets\n"));
-		atomic_add_64(&dlcosmk_data->ipackets, 1);
+		atomic_inc_64(&dlcosmk_data->ipackets);
 		return (0);
 	}
 
@@ -90,7 +90,7 @@
 	    B_FALSE)) == NULL)) {
 		dlcosmk2dbg(("dlcosmk_process:invalid ill index %u\n",
 		    ill_index));
-		atomic_add_64(&dlcosmk_data->ipackets, 1);
+		atomic_inc_64(&dlcosmk_data->ipackets);
 		return (0);
 	}
 
@@ -101,7 +101,7 @@
 	if (!(ill->ill_flags & ILLF_COS_ENABLED)) {
 		dlcosmk2dbg(("dlcosmk_process:ill %u does not support CoS\n",
 		    ill_index));
-		atomic_add_64(&dlcosmk_data->ipackets, 1);
+		atomic_inc_64(&dlcosmk_data->ipackets);
 		ill_refrele(ill);
 		return (0);
 	}
@@ -124,8 +124,7 @@
 					dlur->dl_priority.dl_max =
 					    dlcosmk_data->dl_max;
 				} else {
-					atomic_add_64(&dlcosmk_data->ipackets,
-					    1);
+					atomic_inc_64(&dlcosmk_data->ipackets);
 				}
 				break;
 			}
@@ -134,7 +133,7 @@
 			mp->b_band = dlcosmk_data->b_band;
 			break;
 		default:
-			atomic_add_64(&dlcosmk_data->ipackets, 1);
+			atomic_inc_64(&dlcosmk_data->ipackets);
 			break;
 	}
 
--- old/usr/src/uts/common/ipp/dscpmk/dscpmk.c	2014-07-28 07:44:44.310735355 -0400
+++ new/usr/src/uts/common/ipp/dscpmk/dscpmk.c	2014-07-28 07:44:44.317009315 -0400
@@ -24,8 +24,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/types.h>
 #include <sys/atomic.h>
 #include <sys/pattr.h>
@@ -68,7 +66,7 @@
 			mp = mp->b_cont;
 		} else {
 			dscpmk0dbg(("dscpmk_process: no data\n"));
-			atomic_add_64(&dscpmk_data->epackets, 1);
+			atomic_inc_64(&dscpmk_data->epackets);
 			return (EINVAL);
 		}
 	}
@@ -77,14 +75,14 @@
 	if ((mp->b_wptr - mp->b_rptr) < IP_SIMPLE_HDR_LENGTH) {
 		if (!pullupmsg(mp, IP_SIMPLE_HDR_LENGTH)) {
 			dscpmk0dbg(("dscpmk_process: pullup failed\n"));
-			atomic_add_64(&dscpmk_data->epackets, 1);
+			atomic_inc_64(&dscpmk_data->epackets);
 			return (EINVAL);
 		}
 	}
 	ipha = (ipha_t *)mp->b_rptr;
 
 	/* Update global stats */
-	atomic_add_64(&dscpmk_data->npackets, 1);
+	atomic_inc_64(&dscpmk_data->npackets);
 
 	/*
 	 * This should only be called for outgoing packets. For inbound packets
@@ -92,7 +90,7 @@
 	 */
 	if ((proc == IPP_LOCAL_IN) || (proc == IPP_FWD_IN)) {
 		dscpmk2dbg(("dscpmk_process: cannot mark incoming packets\n"));
-		atomic_add_64(&dscpmk_data->ipackets, 1);
+		atomic_inc_64(&dscpmk_data->ipackets);
 		return (0);
 	}
 
@@ -114,21 +112,21 @@
 	new_dscp = dscpmk_data->dscp_map[dscp >> 2];
 
 	/* Update stats for this new_dscp */
-	atomic_add_64(&dscpmk_data->dscp_stats[new_dscp].npackets, 1);
+	atomic_inc_64(&dscpmk_data->dscp_stats[new_dscp].npackets);
 
 	/*
 	 * if new_dscp is same as the original, update stats and
 	 * return.
 	 */
 	if (new_dscp == (dscp >> 2)) {
-		atomic_add_64(&dscpmk_data->unchanged, 1);
+		atomic_inc_64(&dscpmk_data->unchanged);
 		return (0);
 	}
 
 	/* Get back the ECN/CU value from the original dscp */
 	new_dscp = (new_dscp << 2) | (dscp & 0x3);
 
-	atomic_add_64(&dscpmk_data->changed, 1);
+	atomic_inc_64(&dscpmk_data->changed);
 	/*
 	 * IPv4 : ToS structure -- RFC 791
 	 *
--- old/usr/src/uts/common/ipp/flowacct/flowacct.c	2014-07-28 07:44:44.480873119 -0400
+++ new/usr/src/uts/common/ipp/flowacct/flowacct.c	2014-07-28 07:44:44.487201201 -0400
@@ -496,9 +496,9 @@
 		 * the maximum no. of flow items in the table.
 		 */
 	try_again:
-		atomic_add_32(&flowacct_data->nflows, 1);
+		atomic_inc_32(&flowacct_data->nflows);
 		if (flowacct_data->nflows > flowacct_data->max_limit) {
-			atomic_add_32(&flowacct_data->nflows, -1);
+			atomic_dec_32(&flowacct_data->nflows);
 
 			/* Try timing out once */
 			if (just_once) {
@@ -536,7 +536,7 @@
 				    FLOWACCT_DEL_OBJ);
 			}
 			mutex_exit(&fhead->lock);
-			atomic_add_32(&flowacct_data->nflows, -1);
+			atomic_dec_32(&flowacct_data->nflows);
 			flowacct0dbg(("flowacct_update_flows_tbl: mem alloc "\
 			    "error"));
 			return (-1);
@@ -550,7 +550,7 @@
 				    FLOWACCT_DEL_OBJ);
 			}
 			mutex_exit(&fhead->lock);
-			atomic_add_32(&flowacct_data->nflows, -1);
+			atomic_dec_32(&flowacct_data->nflows);
 			kmem_free(item, FLOWACCT_ITEM_SZ);
 			flowacct0dbg(("flowacct_update_flows_tbl: mem alloc "\
 			    "error\n"));
@@ -887,7 +887,7 @@
 			mp = mp->b_cont;
 		} else {
 			flowacct0dbg(("flowacct_process: no data\n"));
-			atomic_add_64(&flowacct_data->epackets, 1);
+			atomic_inc_64(&flowacct_data->epackets);
 			return (EINVAL);
 		}
 	}
@@ -895,26 +895,26 @@
 	header = kmem_zalloc(FLOWACCT_HEADER_SZ, KM_NOSLEEP);
 	if (header == NULL) {
 		flowacct0dbg(("flowacct_process: error allocing mem"));
-		atomic_add_64(&flowacct_data->epackets, 1);
+		atomic_inc_64(&flowacct_data->epackets);
 		return (ENOMEM);
 	}
 
 	/* Get all the required information into header. */
 	if (flowacct_extract_header(mp, header) != 0) {
 		kmem_free(header, FLOWACCT_HEADER_SZ);
-		atomic_add_64(&flowacct_data->epackets, 1);
+		atomic_inc_64(&flowacct_data->epackets);
 		return (EINVAL);
 	}
 
 	/* Updated the flow table with this entry */
 	if (flowacct_update_flows_tbl(header, flowacct_data) != 0) {
 		kmem_free(header, FLOWACCT_HEADER_SZ);
-		atomic_add_64(&flowacct_data->epackets, 1);
+		atomic_inc_64(&flowacct_data->epackets);
 		return (ENOMEM);
 	}
 
 	/* Update global stats */
-	atomic_add_64(&flowacct_data->npackets, 1);
+	atomic_inc_64(&flowacct_data->npackets);
 	atomic_add_64(&flowacct_data->nbytes, header->pktlen);
 
 	kmem_free(header, FLOWACCT_HEADER_SZ);
--- old/usr/src/uts/common/ipp/ipgpc/classifierddi.c	2014-07-28 07:44:44.680141888 -0400
+++ new/usr/src/uts/common/ipp/ipgpc/classifierddi.c	2014-07-28 07:44:44.686103809 -0400
@@ -413,7 +413,7 @@
 			mp = mp->b_cont; /* jump over the M_CTL into M_DATA */
 		} else {
 			ipgpc0dbg(("ipgpc_invoke_action: no data\n"));
-			atomic_add_64(&ipgpc_epackets, 1);
+			atomic_inc_64(&ipgpc_epackets);
 			return (EINVAL);
 		}
 	}
@@ -485,7 +485,7 @@
 
 	/* ipgpc_classify will only return NULL if a memory error occured */
 	if (out_class == NULL) {
-		atomic_add_64(&ipgpc_epackets, 1);
+		atomic_inc_64(&ipgpc_epackets);
 		return (ENOMEM);
 	}
 
@@ -495,7 +495,7 @@
 
 	if ((rc = ipp_packet_add_class(packet, out_class->class_name,
 	    out_class->next_action)) != 0) {
-		atomic_add_64(&ipgpc_epackets, 1);
+		atomic_inc_64(&ipgpc_epackets);
 		ipgpc0dbg(("ipgpc_invoke_action: ipp_packet_add_class " \
 		    "failed with error %d", rc));
 		return (rc);
--- old/usr/src/uts/common/ipp/ipgpc/filters.c	2014-07-28 07:44:44.858111061 -0400
+++ new/usr/src/uts/common/ipp/ipgpc/filters.c	2014-07-28 07:44:44.864249278 -0400
@@ -275,7 +275,7 @@
 static void
 element_node_ref(element_node_t *element)
 {
-	atomic_add_32(&element->element_refcnt, 1);
+	atomic_inc_32(&element->element_refcnt);
 	ASSERT(element->element_refcnt > 1);
 }
 
@@ -283,7 +283,7 @@
 element_node_unref(element_node_t *element)
 {
 	ASSERT(element->element_refcnt > 0);
-	if (atomic_add_32_nv(&element->element_refcnt, -1) == 0) {
+	if (atomic_dec_32_nv(&element->element_refcnt) == 0) {
 		kmem_cache_free(element_node_cache, element);
 	}
 }
@@ -1136,7 +1136,7 @@
 		mutex_exit(&ipgpc_cid_list_lock);
 	}
 	mutex_exit(&ipgpc_fid_list_lock);
-	atomic_add_long(&ipgpc_num_fltrs, 1);
+	atomic_inc_ulong(&ipgpc_num_fltrs);
 	ipgpc3dbg(("ipgpc_addfilter: adding filter %s", filter->filter_name));
 	return (0);
 }
@@ -1154,12 +1154,12 @@
 	int i;
 
 	for (i = 0; i < NUM_TRIES; ++i) {
-		atomic_add_32(&ipgpc_trie_list[i].stats.num_dontcare, -1);
+		atomic_dec_32(&ipgpc_trie_list[i].stats.num_dontcare);
 	}
 	for (i = 0; i < NUM_TABLES; ++i) {
-		atomic_add_32(&ipgpc_table_list[i].stats.num_dontcare, -1);
+		atomic_dec_32(&ipgpc_table_list[i].stats.num_dontcare);
 	}
-	atomic_add_32(&ipgpc_ds_table_id.stats.num_dontcare, -1);
+	atomic_dec_32(&ipgpc_ds_table_id.stats.num_dontcare);
 }
 
 /*
@@ -1357,7 +1357,7 @@
 		bcopy(in_class->class_name,
 		    ipgpc_cid_list[class_id].aclass.class_name, MAXNAMELEN);
 		ipgpc_cid_list[class_id].filter_list = NULL;
-		atomic_add_long(&ipgpc_num_cls, 1);
+		atomic_inc_ulong(&ipgpc_num_cls);
 	} else {
 		ipgpc0dbg(("insertcid: class name lookup error %d", err));
 		mutex_exit(&ipgpc_cid_list_lock);
@@ -1504,7 +1504,7 @@
 	/* remove filter id from class' list of filters */
 	remove_from_cid_filter_list(ipgpc_fid_list[filter_id].class_id,
 	    filter_id);
-	atomic_add_long(&ipgpc_num_fltrs, -1);
+	atomic_dec_ulong(&ipgpc_num_fltrs);
 	return (0);
 }
 
@@ -1525,7 +1525,7 @@
 		ipgpc_cid_list[in_class_id].cl_stats = NULL;
 	}
 	/* decrement total number of classes loaded */
-	atomic_add_long(&ipgpc_num_cls, -1);
+	atomic_dec_ulong(&ipgpc_num_cls);
 }
 
 /*
--- old/usr/src/uts/common/ipp/ippconf.c	2014-07-28 07:44:45.117153607 -0400
+++ new/usr/src/uts/common/ipp/ippconf.c	2014-07-28 07:44:45.123114156 -0400
@@ -23,8 +23,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/modctl.h>
@@ -1378,7 +1376,7 @@
 			 *	 being incremented.
 			 */
 
-			atomic_add_32(&(ap->ippa_packets), 1);
+			atomic_inc_32(&(ap->ippa_packets));
 
 			imp = ap->ippa_mod;
 			ASSERT(imp != NULL);
@@ -1420,7 +1418,7 @@
 			 * Decrement the packet count.
 			 */
 
-			atomic_add_32(&(ap->ippa_packets), -1);
+			atomic_dec_32(&(ap->ippa_packets));
 
 			/*
 			 * If the class' action id is the same now as it was
@@ -2379,7 +2377,7 @@
 	 * freed.
 	 */
 
-	atomic_add_32(&(imp->ippm_hold_count), 1);
+	atomic_inc_32(&(imp->ippm_hold_count));
 	rw_exit(ipp_mod_byid_lock);
 
 	return (imp);
@@ -2397,7 +2395,7 @@
 	 */
 
 	ASSERT(imp->ippm_hold_count != 0);
-	atomic_add_32(&(imp->ippm_hold_count), -1);
+	atomic_dec_32(&(imp->ippm_hold_count));
 
 	/*
 	 * If the structure has 'destruct pending' set then we tried to free
@@ -3071,7 +3069,7 @@
 	 * freed.
 	 */
 
-	atomic_add_32(&(ap->ippa_hold_count), 1);
+	atomic_inc_32(&(ap->ippa_hold_count));
 	rw_exit(ipp_action_byid_lock);
 
 	return (ap);
@@ -3089,7 +3087,7 @@
 	 */
 
 	ASSERT(ap->ippa_hold_count != 0);
-	atomic_add_32(&(ap->ippa_hold_count), -1);
+	atomic_dec_32(&(ap->ippa_hold_count));
 
 	/*
 	 * If the structure has 'destruct pending' set then we tried to free
--- old/usr/src/uts/common/ipp/meters/tokenmt.c	2014-07-28 07:44:45.389669737 -0400
+++ new/usr/src/uts/common/ipp/meters/tokenmt.c	2014-07-28 07:44:45.395598617 -0400
@@ -24,8 +24,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/types.h>
 #include <sys/kmem.h>
 #include <sys/conf.h>
@@ -84,7 +82,7 @@
 
 	if (mp == NULL) {
 		tokenmt0dbg(("tokenmt_process: null mp!\n"));
-		atomic_add_64(&tokenmt_data->epackets, 1);
+		atomic_inc_64(&tokenmt_data->epackets);
 		return (EINVAL);
 	}
 
@@ -94,7 +92,7 @@
 			mp = mp->b_cont;
 		} else {
 			tokenmt0dbg(("tokenmt_process: no data\n"));
-			atomic_add_64(&tokenmt_data->epackets, 1);
+			atomic_inc_64(&tokenmt_data->epackets);
 			return (EINVAL);
 		}
 	}
@@ -103,7 +101,7 @@
 	if ((mp->b_wptr - mp->b_rptr) < IP_SIMPLE_HDR_LENGTH) {
 		if (!pullupmsg(mp, IP_SIMPLE_HDR_LENGTH)) {
 			tokenmt0dbg(("tokenmt_process: pullup error\n"));
-			atomic_add_64(&tokenmt_data->epackets, 1);
+			atomic_inc_64(&tokenmt_data->epackets);
 			return (EINVAL);
 		}
 	}
@@ -218,14 +216,14 @@
 
 	/* Update Stats */
 	if (*next_action == cfg_parms->green_action) {
-		atomic_add_64(&tokenmt_data->green_packets, 1);
+		atomic_inc_64(&tokenmt_data->green_packets);
 		atomic_add_64(&tokenmt_data->green_bits, pkt_len);
 	} else if (*next_action == cfg_parms->yellow_action) {
-		atomic_add_64(&tokenmt_data->yellow_packets, 1);
+		atomic_inc_64(&tokenmt_data->yellow_packets);
 		atomic_add_64(&tokenmt_data->yellow_bits, pkt_len);
 	} else {
 		ASSERT(*next_action == cfg_parms->red_action);
-		atomic_add_64(&tokenmt_data->red_packets, 1);
+		atomic_inc_64(&tokenmt_data->red_packets);
 		atomic_add_64(&tokenmt_data->red_bits, pkt_len);
 	}
 
--- old/usr/src/uts/common/ipp/meters/tswtcl.c	2014-07-28 07:44:45.564099226 -0400
+++ new/usr/src/uts/common/ipp/meters/tswtcl.c	2014-07-28 07:44:45.570144206 -0400
@@ -24,8 +24,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/types.h>
 #include <sys/kmem.h>
 #include <sys/random.h>
@@ -74,7 +72,7 @@
 
 	if (mp == NULL) {
 		tswtcl0dbg(("tswtcl_process: null mp!\n"));
-		atomic_add_64(&tswtcl_data->epackets, 1);
+		atomic_inc_64(&tswtcl_data->epackets);
 		return (EINVAL);
 	}
 
@@ -84,7 +82,7 @@
 			mp = mp->b_cont;
 		} else {
 			tswtcl0dbg(("tswtcl_process: no data\n"));
-			atomic_add_64(&tswtcl_data->epackets, 1);
+			atomic_inc_64(&tswtcl_data->epackets);
 			return (EINVAL);
 		}
 	}
@@ -93,7 +91,7 @@
 	if ((mp->b_wptr - mp->b_rptr) < IP_SIMPLE_HDR_LENGTH) {
 		if (!pullupmsg(mp, IP_SIMPLE_HDR_LENGTH)) {
 			tswtcl0dbg(("tswtcl_process: pullup error\n"));
-			atomic_add_64(&tswtcl_data->epackets, 1);
+			atomic_inc_64(&tswtcl_data->epackets);
 			return (EINVAL);
 		}
 	}
@@ -184,14 +182,14 @@
 
 	/* Update Stats */
 	if (*next_action == cfg_parms->green_action) {
-		atomic_add_64(&tswtcl_data->green_packets, 1);
+		atomic_inc_64(&tswtcl_data->green_packets);
 		atomic_add_64(&tswtcl_data->green_bits, pkt_len);
 	} else if (*next_action == cfg_parms->yellow_action) {
-		atomic_add_64(&tswtcl_data->yellow_packets, 1);
+		atomic_inc_64(&tswtcl_data->yellow_packets);
 		atomic_add_64(&tswtcl_data->yellow_bits, pkt_len);
 	} else {
 		ASSERT(*next_action == cfg_parms->red_action);
-		atomic_add_64(&tswtcl_data->red_packets, 1);
+		atomic_inc_64(&tswtcl_data->red_packets);
 		atomic_add_64(&tswtcl_data->red_bits, pkt_len);
 	}
 	return (0);
--- old/usr/src/uts/common/os/audit_memory.c	2014-07-28 07:44:45.735949027 -0400
+++ new/usr/src/uts/common/os/audit_memory.c	2014-07-28 07:44:45.741890534 -0400
@@ -39,7 +39,7 @@
 void
 au_pathhold(struct audit_path *app)
 {
-	atomic_add_32(&app->audp_ref, 1);
+	atomic_inc_32(&app->audp_ref);
 }
 
 /*
@@ -48,7 +48,7 @@
 void
 au_pathrele(struct audit_path *app)
 {
-	if (atomic_add_32_nv(&app->audp_ref, -1) > 0)
+	if (atomic_dec_32_nv(&app->audp_ref) > 0)
 		return;
 	kmem_free(app, app->audp_size);
 }
--- old/usr/src/uts/common/os/bio.c	2014-07-28 07:44:45.901660592 -0400
+++ new/usr/src/uts/common/os/bio.c	2014-07-28 07:44:45.907671468 -0400
@@ -1213,7 +1213,7 @@
 	ASSERT(SEMA_HELD(&bp->b_sem));
 
 	cpup = CPU;
-	atomic_add_64(&cpup->cpu_stats.sys.iowait, 1);
+	atomic_inc_64(&cpup->cpu_stats.sys.iowait);
 	DTRACE_IO1(wait__start, struct buf *, bp);
 
 	/*
@@ -1226,7 +1226,7 @@
 		sema_p(&bp->b_io);
 
 	DTRACE_IO1(wait__done, struct buf *, bp);
-	atomic_add_64(&cpup->cpu_stats.sys.iowait, -1);
+	atomic_dec_64(&cpup->cpu_stats.sys.iowait);
 
 	error = geterror(bp);
 	if ((bp->b_flags & B_ASYNC) == 0) {
--- old/usr/src/uts/common/os/clock.c	2014-07-28 07:44:46.133620366 -0400
+++ new/usr/src/uts/common/os/clock.c	2014-07-28 07:44:46.139576809 -0400
@@ -1982,7 +1982,7 @@
 	 * typically be a multiple of the total number of CPUs in
 	 * the system.
 	 */
-	atomic_add_32(&deadman_panics, 1);
+	atomic_inc_32(&deadman_panics);
 
 	if (!deadman_enabled) {
 		CPU->cpu_deadman_countdown = deadman_seconds;
--- old/usr/src/uts/common/os/contract.c	2014-07-28 07:44:46.384253173 -0400
+++ new/usr/src/uts/common/os/contract.c	2014-07-28 07:44:46.390236772 -0400
@@ -2302,7 +2302,7 @@
 	e->cte_data = data;
 	e->cte_gdata = gdata;
 	e->cte_refs = 3;
-	evid = e->cte_id = atomic_add_64_nv(&ct->ct_type->ct_type_evid, 1);
+	evid = e->cte_id = atomic_inc_64_nv(&ct->ct_type->ct_type_evid);
 	contract_hold(ct);
 
 	/*
--- old/usr/src/uts/common/os/cred.c	2014-07-28 07:44:46.636298874 -0400
+++ new/usr/src/uts/common/os/cred.c	2014-07-28 07:44:46.642264939 -0400
@@ -344,7 +344,7 @@
 crhold(cred_t *cr)
 {
 	ASSERT(cr->cr_ref != 0xdeadbeef && cr->cr_ref != 0);
-	atomic_add_32(&cr->cr_ref, 1);
+	atomic_inc_32(&cr->cr_ref);
 }
 
 /*
@@ -355,7 +355,7 @@
 crfree(cred_t *cr)
 {
 	ASSERT(cr->cr_ref != 0xdeadbeef && cr->cr_ref != 0);
-	if (atomic_add_32_nv(&cr->cr_ref, -1) == 0) {
+	if (atomic_dec_32_nv(&cr->cr_ref) == 0) {
 		ASSERT(cr != kcred);
 		if (cr->cr_label)
 			label_rele(cr->cr_label);
@@ -1467,12 +1467,12 @@
 void
 crgrprele(credgrp_t *grps)
 {
-	if (atomic_add_32_nv(&grps->crg_ref, -1) == 0)
+	if (atomic_dec_32_nv(&grps->crg_ref) == 0)
 		kmem_free(grps, CREDGRPSZ(grps->crg_ngroups));
 }
 
 static void
 crgrphold(credgrp_t *grps)
 {
-	atomic_add_32(&grps->crg_ref, 1);
+	atomic_inc_32(&grps->crg_ref);
 }
--- old/usr/src/uts/common/os/ddi_intr.c	2014-07-28 07:44:46.844793788 -0400
+++ new/usr/src/uts/common/os/ddi_intr.c	2014-07-28 07:44:46.850779215 -0400
@@ -678,7 +678,7 @@
 		dup_hdlp = (ddi_intr_handle_impl_t *)
 		    kmem_alloc(sizeof (ddi_intr_handle_impl_t), KM_SLEEP);
 
-		atomic_add_32(&hdlp->ih_dup_cnt, 1);
+		atomic_inc_32(&hdlp->ih_dup_cnt);
 
 		*dup = (ddi_intr_handle_t)dup_hdlp;
 		bcopy(hdlp, dup_hdlp, sizeof (ddi_intr_handle_impl_t));
--- old/usr/src/uts/common/os/ddifm.c	2014-07-28 07:44:47.060136496 -0400
+++ new/usr/src/uts/common/os/ddifm.c	2014-07-28 07:44:47.066107722 -0400
@@ -455,7 +455,7 @@
 
 	/* Count errors as drops. */
 err:	if (fmhdl)
-		atomic_add_64(&fmhdl->fh_kstat.fek_erpt_dropped.value.ui64, 1);
+		atomic_inc_64(&fmhdl->fh_kstat.fek_erpt_dropped.value.ui64);
 
 	/* Free up nvlists if normal interfaces were used to allocate memory */
 out:	if (ereport && (nva == NULL))
@@ -1019,7 +1019,7 @@
 	i_hdlp->ahi_err->err_ena = ena;
 	i_hdlp->ahi_err->err_status = status;
 	i_hdlp->ahi_err->err_expected = flag;
-	atomic_add_64(&fmhdl->fh_kstat.fek_acc_err.value.ui64, 1);
+	atomic_inc_64(&fmhdl->fh_kstat.fek_acc_err.value.ui64);
 }
 
 void
@@ -1032,7 +1032,7 @@
 	hdlp->dmai_error.err_ena = ena;
 	hdlp->dmai_error.err_status = status;
 	hdlp->dmai_error.err_expected = flag;
-	atomic_add_64(&fmhdl->fh_kstat.fek_dma_err.value.ui64, 1);
+	atomic_inc_64(&fmhdl->fh_kstat.fek_dma_err.value.ui64);
 }
 
 ddi_fmcompare_t
--- old/usr/src/uts/common/os/devcfg.c	2014-07-28 07:44:47.258298012 -0400
+++ new/usr/src/uts/common/os/devcfg.c	2014-07-28 07:44:47.264577758 -0400
@@ -1612,10 +1612,10 @@
 				rv = DDI_FAILURE;
 				break;
 			}
-			atomic_add_long(&devinfo_attach_detach, 1);
+			atomic_inc_ulong(&devinfo_attach_detach);
 			if ((rv = attach_node(dip)) == DDI_SUCCESS)
 				i_ddi_set_node_state(dip, DS_ATTACHED);
-			atomic_add_long(&devinfo_attach_detach, -1);
+			atomic_dec_ulong(&devinfo_attach_detach);
 			break;
 		case DS_ATTACHED:
 			if ((rv = postattach_node(dip)) == DDI_SUCCESS)
@@ -1681,7 +1681,7 @@
 				i_ddi_set_node_state(dip, DS_INITIALIZED);
 			break;
 		case DS_ATTACHED:
-			atomic_add_long(&devinfo_attach_detach, 1);
+			atomic_inc_ulong(&devinfo_attach_detach);
 
 			mutex_enter(&(DEVI(dip)->devi_lock));
 			DEVI_SET_DETACHING(dip);
@@ -1696,7 +1696,7 @@
 			DEVI_CLR_DETACHING(dip);
 			mutex_exit(&(DEVI(dip)->devi_lock));
 
-			atomic_add_long(&devinfo_attach_detach, -1);
+			atomic_dec_ulong(&devinfo_attach_detach);
 			break;
 		case DS_READY:
 			if ((rv = predetach_node(dip, flag)) == DDI_SUCCESS)
--- old/usr/src/uts/common/os/devpolicy.c	2014-07-28 07:44:47.732918721 -0400
+++ new/usr/src/uts/common/os/devpolicy.c	2014-07-28 07:44:47.738810708 -0400
@@ -181,14 +181,14 @@
 dphold(devplcy_t *dp)
 {
 	ASSERT(dp->dp_ref != 0xdeadbeef && dp->dp_ref != 0);
-	atomic_add_32(&dp->dp_ref, 1);
+	atomic_inc_32(&dp->dp_ref);
 }
 
 void
 dpfree(devplcy_t *dp)
 {
 	ASSERT(dp->dp_ref != 0xdeadbeef && dp->dp_ref != 0);
-	if (atomic_add_32_nv(&dp->dp_ref, -1) == 0)
+	if (atomic_dec_32_nv(&dp->dp_ref) == 0)
 		kmem_free(dp, sizeof (*dp));
 }
 
--- old/usr/src/uts/common/os/driver_lyr.c	2014-07-28 07:44:47.919916313 -0400
+++ new/usr/src/uts/common/os/driver_lyr.c	2014-07-28 07:44:47.925985340 -0400
@@ -408,7 +408,7 @@
 	/* add it to the handle hash */
 	lhp->lh_next = ldi_handle_hash[index];
 	ldi_handle_hash[index] = lhp;
-	atomic_add_long(&ldi_handle_hash_count, 1);
+	atomic_inc_ulong(&ldi_handle_hash_count);
 
 	LDI_ALLOCFREE((CE_WARN, "ldi handle alloc: new "
 	    "lh=0x%p, ident=0x%p, vp=0x%p, drv=%s, minor=0x%x",
@@ -448,7 +448,7 @@
 	lhpp = handle_find_ref_nolock(lhp->lh_vp, lhp->lh_ident);
 	ASSERT((lhpp != NULL) && (*lhpp != NULL));
 	*lhpp = lhp->lh_next;
-	atomic_add_long(&ldi_handle_hash_count, -1);
+	atomic_dec_ulong(&ldi_handle_hash_count);
 	mutex_exit(&ldi_handle_hash_lock[index]);
 
 	VN_RELE(lhp->lh_vp);
--- old/usr/src/uts/common/os/errorq.c	2014-07-28 07:44:48.205901699 -0400
+++ new/usr/src/uts/common/os/errorq.c	2014-07-28 07:44:48.211911460 -0400
@@ -524,7 +524,7 @@
 	errorq_elem_t *eep, *old;
 
 	if (eqp == NULL || !(eqp->eq_flags & ERRORQ_ACTIVE)) {
-		atomic_add_64(&errorq_lost, 1);
+		atomic_inc_64(&errorq_lost);
 		return; /* drop error if queue is uninitialized or disabled */
 	}
 
@@ -533,7 +533,7 @@
 
 		if ((i = errorq_availbit(eqp->eq_bitmap, eqp->eq_qlen,
 		    eqp->eq_rotor)) == -1) {
-			atomic_add_64(&eqp->eq_kstat.eqk_dropped.value.ui64, 1);
+			atomic_inc_64(&eqp->eq_kstat.eqk_dropped.value.ui64);
 			return;
 		}
 		BT_ATOMIC_SET_EXCL(eqp->eq_bitmap, i, rval);
@@ -559,7 +559,7 @@
 			break;
 	}
 
-	atomic_add_64(&eqp->eq_kstat.eqk_dispatched.value.ui64, 1);
+	atomic_inc_64(&eqp->eq_kstat.eqk_dispatched.value.ui64);
 
 	if (flag == ERRORQ_ASYNC && eqp->eq_id != NULL)
 		ddi_trigger_softintr(eqp->eq_id);
@@ -867,7 +867,7 @@
 	errorq_elem_t *eqep;
 
 	if (eqp == NULL || !(eqp->eq_flags & ERRORQ_ACTIVE)) {
-		atomic_add_64(&errorq_lost, 1);
+		atomic_inc_64(&errorq_lost);
 		return (NULL);
 	}
 
@@ -876,7 +876,7 @@
 
 		if ((i = errorq_availbit(eqp->eq_bitmap, eqp->eq_qlen,
 		    eqp->eq_rotor)) == -1) {
-			atomic_add_64(&eqp->eq_kstat.eqk_dropped.value.ui64, 1);
+			atomic_inc_64(&eqp->eq_kstat.eqk_dropped.value.ui64);
 			return (NULL);
 		}
 		BT_ATOMIC_SET_EXCL(eqp->eq_bitmap, i, rval);
@@ -893,7 +893,7 @@
 		eqnp->eqn_nvl = fm_nvlist_create(eqnp->eqn_nva);
 	}
 
-	atomic_add_64(&eqp->eq_kstat.eqk_reserved.value.ui64, 1);
+	atomic_inc_64(&eqp->eq_kstat.eqk_reserved.value.ui64);
 	return (eqep);
 }
 
@@ -908,7 +908,7 @@
 	errorq_elem_t *old;
 
 	if (eqep == NULL || !(eqp->eq_flags & ERRORQ_ACTIVE)) {
-		atomic_add_64(&eqp->eq_kstat.eqk_commit_fail.value.ui64, 1);
+		atomic_inc_64(&eqp->eq_kstat.eqk_commit_fail.value.ui64);
 		return;
 	}
 
@@ -921,7 +921,7 @@
 			break;
 	}
 
-	atomic_add_64(&eqp->eq_kstat.eqk_committed.value.ui64, 1);
+	atomic_inc_64(&eqp->eq_kstat.eqk_committed.value.ui64);
 
 	if (flag == ERRORQ_ASYNC && eqp->eq_id != NULL)
 		ddi_trigger_softintr(eqp->eq_id);
@@ -939,7 +939,7 @@
 
 	BT_ATOMIC_CLEAR(eqp->eq_bitmap, eqep - eqp->eq_elems);
 
-	atomic_add_64(&eqp->eq_kstat.eqk_cancelled.value.ui64, 1);
+	atomic_inc_64(&eqp->eq_kstat.eqk_cancelled.value.ui64);
 }
 
 /*
--- old/usr/src/uts/common/os/evchannels.c	2014-07-28 07:44:48.406552511 -0400
+++ new/usr/src/uts/common/os/evchannels.c	2014-07-28 07:44:48.412497947 -0400
@@ -379,7 +379,7 @@
 {
 	int32_t refcnt;
 
-	refcnt = (int32_t)atomic_add_32_nv(&evp->ge_refcount, -1);
+	refcnt = (int32_t)atomic_dec_32_nv(&evp->ge_refcount);
 	if (refcnt <= 0) {
 		if (evp->ge_destruct != NULL) {
 			evp->ge_destruct((void *)&(evp->ge_payload),
@@ -647,7 +647,7 @@
 	}
 	qep->q_objref = (void *)evp;
 	qep->q_objsize = size;
-	atomic_add_32(&evp->ge_refcount, 1);
+	atomic_inc_32(&evp->ge_refcount);
 	mutex_enter(&eqp->eq_queuemx);
 	evch_q_in(&eqp->eq_eventq, qep);
 
--- old/usr/src/uts/common/os/exit.c	2014-07-28 07:44:48.648643784 -0400
+++ new/usr/src/uts/common/os/exit.c	2014-07-28 07:44:48.654662890 -0400
@@ -597,7 +597,7 @@
 	 */
 	mutex_enter(&p->p_lock);
 	ASSERT(p->p_pool->pool_ref > 0);
-	atomic_add_32(&p->p_pool->pool_ref, -1);
+	atomic_dec_32(&p->p_pool->pool_ref);
 	p->p_pool = pool_default;
 	/*
 	 * Now that our address space has been freed and all other threads
--- old/usr/src/uts/common/os/fio.c	2014-07-28 07:44:48.856398023 -0400
+++ new/usr/src/uts/common/os/fio.c	2014-07-28 07:44:48.862357777 -0400
@@ -67,7 +67,7 @@
 static uint32_t afd_free;	/* count of kmem_free()s */
 static uint32_t afd_wait;	/* count of waits on non-zero ref count */
 #define	MAXFD(x)	(afd_maxfd = ((afd_maxfd >= (x))? afd_maxfd : (x)))
-#define	COUNT(x)	atomic_add_32(&x, 1)
+#define	COUNT(x)	atomic_inc_32(&x)
 
 #else	/* DEBUG */
 
--- old/usr/src/uts/common/os/fm.c	2014-07-28 07:44:49.090842124 -0400
+++ new/usr/src/uts/common/os/fm.c	2014-07-28 07:44:49.096832095 -0400
@@ -517,19 +517,19 @@
 
 	(void) nvlist_size(ereport, &nvl_size, NV_ENCODE_NATIVE);
 	if (nvl_size > ERPT_DATA_SZ || nvl_size == 0) {
-		atomic_add_64(&erpt_kstat_data.erpt_dropped.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.erpt_dropped.value.ui64);
 		return;
 	}
 
 	if (sysevent_evc_bind(FM_ERROR_CHAN, &error_chan,
 	    EVCH_CREAT|EVCH_HOLD_PEND) != 0) {
-		atomic_add_64(&erpt_kstat_data.erpt_dropped.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.erpt_dropped.value.ui64);
 		return;
 	}
 
 	if (sysevent_evc_publish(error_chan, EC_FM, ESC_FM_ERROR,
 	    SUNW_VENDOR, FM_PUB, ereport, evc_flag) != 0) {
-		atomic_add_64(&erpt_kstat_data.erpt_dropped.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.erpt_dropped.value.ui64);
 		(void) sysevent_evc_unbind(error_chan);
 		return;
 	}
@@ -791,8 +791,7 @@
 	va_end(ap);
 
 	if (ret)
-		atomic_add_64(
-		    &erpt_kstat_data.payload_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.payload_set_failed.value.ui64);
 }
 
 /*
@@ -825,24 +824,24 @@
 	int ret;
 
 	if (version != FM_EREPORT_VERS0) {
-		atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64);
 		return;
 	}
 
 	(void) snprintf(ereport_class, FM_MAX_CLASS, "%s.%s",
 	    FM_EREPORT_CLASS, erpt_class);
 	if (nvlist_add_string(ereport, FM_CLASS, ereport_class) != 0) {
-		atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64);
 		return;
 	}
 
 	if (nvlist_add_uint64(ereport, FM_EREPORT_ENA, ena)) {
-		atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64);
 	}
 
 	if (nvlist_add_nvlist(ereport, FM_EREPORT_DETECTOR,
 	    (nvlist_t *)detector) != 0) {
-		atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64);
 	}
 
 	va_start(ap, detector);
@@ -851,7 +850,7 @@
 	va_end(ap);
 
 	if (ret)
-		atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64);
 }
 
 /*
@@ -874,19 +873,19 @@
 fm_fmri_hc_set_common(nvlist_t *fmri, int version, const nvlist_t *auth)
 {
 	if (version != FM_HC_SCHEME_VERSION) {
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 		return (0);
 	}
 
 	if (nvlist_add_uint8(fmri, FM_VERSION, version) != 0 ||
 	    nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_HC) != 0) {
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 		return (0);
 	}
 
 	if (auth != NULL && nvlist_add_nvlist(fmri, FM_FMRI_AUTHORITY,
 	    (nvlist_t *)auth) != 0) {
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 		return (0);
 	}
 
@@ -918,22 +917,22 @@
 		pairs[i] = fm_nvlist_create(nva);
 		if (nvlist_add_string(pairs[i], FM_FMRI_HC_NAME, name) != 0 ||
 		    nvlist_add_string(pairs[i], FM_FMRI_HC_ID, idstr) != 0) {
-			atomic_add_64(
-			    &erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+			atomic_inc_64(
+			    &erpt_kstat_data.fmri_set_failed.value.ui64);
 		}
 	}
 	va_end(ap);
 
 	if (nvlist_add_nvlist_array(fmri, FM_FMRI_HC_LIST, pairs, npairs) != 0)
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 
 	for (i = 0; i < npairs; i++)
 		fm_nvlist_destroy(pairs[i], FM_NVA_RETAIN);
 
 	if (snvl != NULL) {
 		if (nvlist_add_nvlist(fmri, FM_FMRI_HC_SPECIFIC, snvl) != 0) {
-			atomic_add_64(
-			    &erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+			atomic_inc_64(
+			    &erpt_kstat_data.fmri_set_failed.value.ui64);
 		}
 	}
 }
@@ -958,7 +957,7 @@
 	int err = 0;
 
 	if (version != DEV_SCHEME_VERSION0) {
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 		return;
 	}
 
@@ -979,7 +978,7 @@
 		err |= nvlist_add_string(fmri_dev, FM_FMRI_DEV_TGTPTLUN0, tpl0);
 
 	if (err)
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 
 }
 
@@ -1004,35 +1003,35 @@
 	uint64_t *failedp = &erpt_kstat_data.fmri_set_failed.value.ui64;
 
 	if (version < CPU_SCHEME_VERSION1) {
-		atomic_add_64(failedp, 1);
+		atomic_inc_64(failedp);
 		return;
 	}
 
 	if (nvlist_add_uint8(fmri_cpu, FM_VERSION, version) != 0) {
-		atomic_add_64(failedp, 1);
+		atomic_inc_64(failedp);
 		return;
 	}
 
 	if (nvlist_add_string(fmri_cpu, FM_FMRI_SCHEME,
 	    FM_FMRI_SCHEME_CPU) != 0) {
-		atomic_add_64(failedp, 1);
+		atomic_inc_64(failedp);
 		return;
 	}
 
 	if (auth != NULL && nvlist_add_nvlist(fmri_cpu, FM_FMRI_AUTHORITY,
 	    (nvlist_t *)auth) != 0)
-		atomic_add_64(failedp, 1);
+		atomic_inc_64(failedp);
 
 	if (nvlist_add_uint32(fmri_cpu, FM_FMRI_CPU_ID, cpu_id) != 0)
-		atomic_add_64(failedp, 1);
+		atomic_inc_64(failedp);
 
 	if (cpu_maskp != NULL && nvlist_add_uint8(fmri_cpu, FM_FMRI_CPU_MASK,
 	    *cpu_maskp) != 0)
-		atomic_add_64(failedp, 1);
+		atomic_inc_64(failedp);
 
 	if (serial_idp == NULL || nvlist_add_string(fmri_cpu,
 	    FM_FMRI_CPU_SERIAL_ID, (char *)serial_idp) != 0)
-			atomic_add_64(failedp, 1);
+			atomic_inc_64(failedp);
 }
 
 /*
@@ -1053,49 +1052,47 @@
     const char *unum, const char *serial, uint64_t offset)
 {
 	if (version != MEM_SCHEME_VERSION0) {
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 		return;
 	}
 
 	if (!serial && (offset != (uint64_t)-1)) {
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 		return;
 	}
 
 	if (nvlist_add_uint8(fmri, FM_VERSION, version) != 0) {
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 		return;
 	}
 
 	if (nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_MEM) != 0) {
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 		return;
 	}
 
 	if (auth != NULL) {
 		if (nvlist_add_nvlist(fmri, FM_FMRI_AUTHORITY,
 		    (nvlist_t *)auth) != 0) {
-			atomic_add_64(
-			    &erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+			atomic_inc_64(
+			    &erpt_kstat_data.fmri_set_failed.value.ui64);
 		}
 	}
 
 	if (nvlist_add_string(fmri, FM_FMRI_MEM_UNUM, unum) != 0) {
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 	}
 
 	if (serial != NULL) {
 		if (nvlist_add_string_array(fmri, FM_FMRI_MEM_SERIAL_ID,
 		    (char **)&serial, 1) != 0) {
-			atomic_add_64(
-			    &erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+			atomic_inc_64(
+			    &erpt_kstat_data.fmri_set_failed.value.ui64);
 		}
-		if (offset != (uint64_t)-1) {
-			if (nvlist_add_uint64(fmri, FM_FMRI_MEM_OFFSET,
-			    offset) != 0) {
-				atomic_add_64(&erpt_kstat_data.
-				    fmri_set_failed.value.ui64, 1);
-			}
+		if (offset != (uint64_t)-1 && nvlist_add_uint64(fmri,
+		    FM_FMRI_MEM_OFFSET, offset) != 0) {
+			atomic_inc_64(
+			    &erpt_kstat_data.fmri_set_failed.value.ui64);
 		}
 	}
 }
@@ -1105,28 +1102,28 @@
     uint64_t vdev_guid)
 {
 	if (version != ZFS_SCHEME_VERSION0) {
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 		return;
 	}
 
 	if (nvlist_add_uint8(fmri, FM_VERSION, version) != 0) {
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 		return;
 	}
 
 	if (nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_ZFS) != 0) {
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 		return;
 	}
 
 	if (nvlist_add_uint64(fmri, FM_FMRI_ZFS_POOL, pool_guid) != 0) {
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 	}
 
 	if (vdev_guid != 0) {
 		if (nvlist_add_uint64(fmri, FM_FMRI_ZFS_VDEV, vdev_guid) != 0) {
-			atomic_add_64(
-			    &erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+			atomic_inc_64(
+			    &erpt_kstat_data.fmri_set_failed.value.ui64);
 		}
 	}
 }
@@ -1306,20 +1303,20 @@
 	 */
 	if (nvlist_lookup_nvlist_array(bboard, FM_FMRI_HC_LIST, &hcl, &n)
 	    != 0) {
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 		return;
 	}
 
 	for (i = 0; i < n; i++) {
 		if (nvlist_lookup_string(hcl[i], FM_FMRI_HC_NAME,
 		    &hcname) != 0) {
-			atomic_add_64(
-			    &erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+			atomic_inc_64(
+			    &erpt_kstat_data.fmri_set_failed.value.ui64);
 			return;
 		}
 		if (nvlist_lookup_string(hcl[i], FM_FMRI_HC_ID, &hcid) != 0) {
-			atomic_add_64(
-			    &erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+			atomic_inc_64(
+			    &erpt_kstat_data.fmri_set_failed.value.ui64);
 			return;
 		}
 
@@ -1331,8 +1328,8 @@
 					fm_nvlist_destroy(pairs[j],
 					    FM_NVA_RETAIN);
 			}
-			atomic_add_64(
-			    &erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+			atomic_inc_64(
+			    &erpt_kstat_data.fmri_set_failed.value.ui64);
 			return;
 		}
 	}
@@ -1356,8 +1353,8 @@
 					fm_nvlist_destroy(pairs[j],
 					    FM_NVA_RETAIN);
 			}
-			atomic_add_64(
-			    &erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+			atomic_inc_64(
+			    &erpt_kstat_data.fmri_set_failed.value.ui64);
 			return;
 		}
 	}
@@ -1368,7 +1365,7 @@
 	 */
 	if (nvlist_add_nvlist_array(fmri, FM_FMRI_HC_LIST, pairs,
 	    npairs + n) != 0) {
-		atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+		atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64);
 		return;
 	}
 
@@ -1378,8 +1375,8 @@
 
 	if (snvl != NULL) {
 		if (nvlist_add_nvlist(fmri, FM_FMRI_HC_SPECIFIC, snvl) != 0) {
-			atomic_add_64(
-			    &erpt_kstat_data.fmri_set_failed.value.ui64, 1);
+			atomic_inc_64(
+				&erpt_kstat_data.fmri_set_failed.value.ui64);
 			return;
 		}
 	}
--- old/usr/src/uts/common/os/fork.c	2014-07-28 07:44:49.307241790 -0400
+++ new/usr/src/uts/common/os/fork.c	2014-07-28 07:44:49.313197192 -0400
@@ -274,7 +274,7 @@
 			tk = cp->p_task;
 			task_detach(cp);
 			ASSERT(cp->p_pool->pool_ref > 0);
-			atomic_add_32(&cp->p_pool->pool_ref, -1);
+			atomic_dec_32(&cp->p_pool->pool_ref);
 			mutex_exit(&cp->p_lock);
 			pid_exit(cp, tk);
 			mutex_exit(&pidlock);
@@ -628,7 +628,7 @@
 	tk = cp->p_task;
 	task_detach(cp);
 	ASSERT(cp->p_pool->pool_ref > 0);
-	atomic_add_32(&cp->p_pool->pool_ref, -1);
+	atomic_dec_32(&cp->p_pool->pool_ref);
 	mutex_exit(&cp->p_lock);
 
 	orphpp = &p->p_orphan;
@@ -1128,7 +1128,7 @@
 	} else {
 		cp->p_pool = pp->p_pool;
 	}
-	atomic_add_32(&cp->p_pool->pool_ref, 1);
+	atomic_inc_32(&cp->p_pool->pool_ref);
 	mutex_exit(&pp->p_lock);
 
 	/*
--- old/usr/src/uts/common/os/kcpc.c	2014-07-28 07:44:49.521428556 -0400
+++ new/usr/src/uts/common/os/kcpc.c	2014-07-28 07:44:49.527393224 -0400
@@ -938,7 +938,7 @@
 	if (t->t_flag & T_INTR_THREAD) {
 		klwp_t *lwp;
 
-		atomic_add_32(&kcpc_intrctx_count, 1);
+		atomic_inc_32(&kcpc_intrctx_count);
 
 		/*
 		 * Note that t_lwp is always set to point at the underlying
@@ -1008,7 +1008,7 @@
 		cmn_err(CE_NOTE,
 		    "null cpc context found in overflow handler!\n");
 #endif
-		atomic_add_32(&kcpc_nullctx_count, 1);
+		atomic_inc_32(&kcpc_nullctx_count);
 	} else if ((ctx->kc_flags & KCPC_CTX_INVALID) == 0) {
 		/*
 		 * Schedule an ast to sample the counters, which will
--- old/usr/src/uts/common/os/klpd.c	2014-07-28 07:44:49.767729565 -0400
+++ new/usr/src/uts/common/os/klpd.c	2014-07-28 07:44:49.773652628 -0400
@@ -87,7 +87,7 @@
 void
 klpd_rele(klpd_reg_t *p)
 {
-	if (atomic_add_32_nv(&p->klpd_ref, -1) == 0) {
+	if (atomic_dec_32_nv(&p->klpd_ref) == 0) {
 		if (p->klpd_refp != NULL)
 			klpd_unlink(p);
 		if (p->klpd_cred != NULL)
@@ -116,7 +116,7 @@
 static void
 klpd_hold(klpd_reg_t *p)
 {
-	atomic_add_32(&p->klpd_ref, 1);
+	atomic_inc_32(&p->klpd_ref);
 }
 
 /*
@@ -350,7 +350,7 @@
 	 */
 	if (mutex_owned(&pidlock) || mutex_owned(&curproc->p_lock) ||
 	    mutex_owned(&curproc->p_crlock)) {
-		atomic_add_32(&klpd_bad_locks, 1);
+		atomic_inc_32(&klpd_bad_locks);
 		return (-1);
 	}
 
@@ -674,13 +674,13 @@
 void
 crklpd_hold(credklpd_t *crkpd)
 {
-	atomic_add_32(&crkpd->crkl_ref, 1);
+	atomic_inc_32(&crkpd->crkl_ref);
 }
 
 void
 crklpd_rele(credklpd_t *crkpd)
 {
-	if (atomic_add_32_nv(&crkpd->crkl_ref, -1) == 0) {
+	if (atomic_dec_32_nv(&crkpd->crkl_ref) == 0) {
 		if (crkpd->crkl_reg != NULL)
 			klpd_rele(crkpd->crkl_reg);
 		mutex_destroy(&crkpd->crkl_lock);
--- old/usr/src/uts/common/os/kmem.c	2014-07-28 07:44:49.969786370 -0400
+++ new/usr/src/uts/common/os/kmem.c	2014-07-28 07:44:49.975973241 -0400
@@ -1626,7 +1626,7 @@
 vmem_alloc_failure:
 
 	kmem_log_event(kmem_failure_log, cp, NULL, NULL);
-	atomic_add_64(&cp->cache_alloc_fail, 1);
+	atomic_inc_64(&cp->cache_alloc_fail);
 
 	return (NULL);
 }
@@ -1995,7 +1995,7 @@
 
 	if (mtbf || (construct && cp->cache_constructor != NULL &&
 	    cp->cache_constructor(buf, cp->cache_private, kmflag) != 0)) {
-		atomic_add_64(&cp->cache_alloc_fail, 1);
+		atomic_inc_64(&cp->cache_alloc_fail);
 		btp->bt_bxstat = (intptr_t)bcp ^ KMEM_BUFTAG_FREE;
 		if (cp->cache_flags & KMF_DEADBEEF)
 			copy_pattern(KMEM_FREE_PATTERN, buf, cp->cache_verify);
@@ -2603,7 +2603,7 @@
 
 	if (cp->cache_constructor != NULL &&
 	    cp->cache_constructor(buf, cp->cache_private, kmflag) != 0) {
-		atomic_add_64(&cp->cache_alloc_fail, 1);
+		atomic_inc_64(&cp->cache_alloc_fail);
 		kmem_slab_free(cp, buf);
 		return (NULL);
 	}
@@ -4877,7 +4877,7 @@
 	} else if (cp->cache_constructor != NULL &&
 	    cp->cache_constructor(callback->kmm_to_buf, cp->cache_private,
 	    KM_NOSLEEP) != 0) {
-		atomic_add_64(&cp->cache_alloc_fail, 1);
+		atomic_inc_64(&cp->cache_alloc_fail);
 		KMEM_STAT_ADD(kmem_move_stats.kms_constructor_fail);
 		kmem_slab_free(cp, callback->kmm_to_buf);
 		kmem_move_end(cp, callback);
--- old/usr/src/uts/common/os/lgrp.c	2014-07-28 07:44:50.333992821 -0400
+++ new/usr/src/uts/common/os/lgrp.c	2014-07-28 07:44:50.340016211 -0400
@@ -584,12 +584,12 @@
 		cp->cpu_lpl = lpl_bootstrap;
 
 		lgrp_plat_config(event, resource);
-		atomic_add_32(&lgrp_gen, 1);
+		atomic_inc_32(&lgrp_gen);
 
 		break;
 	case LGRP_CONFIG_CPU_DEL:
 		lgrp_plat_config(event, resource);
-		atomic_add_32(&lgrp_gen, 1);
+		atomic_inc_32(&lgrp_gen);
 
 		break;
 	case LGRP_CONFIG_CPU_ONLINE:
@@ -601,7 +601,7 @@
 			panic("lpl_topo_verify failed: %d", rc);
 		}
 		lgrp_plat_config(event, resource);
-		atomic_add_32(&lgrp_gen, 1);
+		atomic_inc_32(&lgrp_gen);
 
 		break;
 	case LGRP_CONFIG_CPU_OFFLINE:
@@ -614,7 +614,7 @@
 			panic("lpl_topo_verify failed: %d", rc);
 		}
 		lgrp_plat_config(event, resource);
-		atomic_add_32(&lgrp_gen, 1);
+		atomic_inc_32(&lgrp_gen);
 
 		break;
 	case LGRP_CONFIG_CPUPART_ADD:
@@ -643,12 +643,12 @@
 	 */
 	case LGRP_CONFIG_MEM_ADD:
 		lgrp_mem_init((int)resource, where, B_FALSE);
-		atomic_add_32(&lgrp_gen, 1);
+		atomic_inc_32(&lgrp_gen);
 
 		break;
 	case LGRP_CONFIG_MEM_DEL:
 		lgrp_mem_fini((int)resource, where, B_FALSE);
-		atomic_add_32(&lgrp_gen, 1);
+		atomic_inc_32(&lgrp_gen);
 
 		break;
 	case LGRP_CONFIG_MEM_RENAME: {
@@ -658,12 +658,12 @@
 		lgrp_mem_rename((int)resource,
 		    ren_arg->lmem_rename_from,
 		    ren_arg->lmem_rename_to);
-		atomic_add_32(&lgrp_gen, 1);
+		atomic_inc_32(&lgrp_gen);
 
 		break;
 	}
 	case LGRP_CONFIG_GEN_UPDATE:
-		atomic_add_32(&lgrp_gen, 1);
+		atomic_inc_32(&lgrp_gen);
 
 		break;
 	case LGRP_CONFIG_FLATTEN:
--- old/usr/src/uts/common/os/mmapobj.c	2014-07-28 07:44:50.653219076 -0400
+++ new/usr/src/uts/common/os/mmapobj.c	2014-07-28 07:44:50.659152725 -0400
@@ -309,9 +309,9 @@
 		vmem_xfree(is_64bit ? lib_va_64_arena : lib_va_32_arena,
 		    lvp->lv_base_va, lvp->lv_len);
 		if (is_64bit) {
-			atomic_add_32(&libs_mapped_64, -1);
+			atomic_dec_32(&libs_mapped_64);
 		} else {
-			atomic_add_32(&libs_mapped_32, -1);
+			atomic_dec_32(&libs_mapped_32);
 		}
 	}
 	kmem_free(lvp, sizeof (struct lib_va));
@@ -472,10 +472,10 @@
 
 	if (base_va != NULL) {
 		if (model == DATAMODEL_LP64) {
-			atomic_add_32(&libs_mapped_64, 1);
+			atomic_inc_32(&libs_mapped_64);
 		} else {
 			ASSERT(model == DATAMODEL_ILP32);
-			atomic_add_32(&libs_mapped_32, 1);
+			atomic_inc_32(&libs_mapped_32);
 		}
 	}
 	ASSERT(*tmp == NULL);
--- old/usr/src/uts/common/os/pool.c	2014-07-28 07:44:50.897619712 -0400
+++ new/usr/src/uts/common/os/pool.c	2014-07-28 07:44:50.903572291 -0400
@@ -1687,9 +1687,9 @@
 		 */
 		if (p->p_pool != pool) {
 			ASSERT(p->p_pool->pool_ref > 0);
-			atomic_add_32(&p->p_pool->pool_ref, -1);
+			atomic_dec_32(&p->p_pool->pool_ref);
 			p->p_pool = pool;
-			atomic_add_32(&p->p_pool->pool_ref, 1);
+			atomic_inc_32(&p->p_pool->pool_ref);
 		}
 		/*
 		 * Okay, we've tortured this guy enough.
--- old/usr/src/uts/common/os/refstr.c	2014-07-28 07:44:51.117509403 -0400
+++ new/usr/src/uts/common/os/refstr.c	2014-07-28 07:44:51.123488389 -0400
@@ -24,8 +24,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/systm.h>
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -57,12 +55,12 @@
 void
 refstr_hold(refstr_t *rsp)
 {
-	atomic_add_32(&rsp->rs_refcnt, 1);
+	atomic_inc_32(&rsp->rs_refcnt);
 }
 
 void
 refstr_rele(refstr_t *rsp)
 {
-	if (atomic_add_32_nv(&rsp->rs_refcnt, -1) == 0)
+	if (atomic_dec_32_nv(&rsp->rs_refcnt) == 0)
 		kmem_free(rsp, (size_t)rsp->rs_size);
 }
--- old/usr/src/uts/common/os/sid.c	2014-07-28 07:44:51.279556126 -0400
+++ new/usr/src/uts/common/os/sid.c	2014-07-28 07:44:51.285692601 -0400
@@ -79,13 +79,13 @@
 void
 ksiddomain_hold(ksiddomain_t *kd)
 {
-	atomic_add_32(&kd->kd_ref, 1);
+	atomic_inc_32(&kd->kd_ref);
 }
 
 void
 ksiddomain_rele(ksiddomain_t *kd)
 {
-	if (atomic_add_32_nv(&kd->kd_ref, -1) == 0) {
+	if (atomic_dec_32_nv(&kd->kd_ref) == 0) {
 		/*
 		 * The kd reference can only be incremented from 0 when
 		 * the sid_lock is held; so we lock and then check need to
@@ -104,13 +104,13 @@
 void
 ksidlist_hold(ksidlist_t *ksl)
 {
-	atomic_add_32(&ksl->ksl_ref, 1);
+	atomic_inc_32(&ksl->ksl_ref);
 }
 
 void
 ksidlist_rele(ksidlist_t *ksl)
 {
-	if (atomic_add_32_nv(&ksl->ksl_ref, -1) == 0) {
+	if (atomic_dec_32_nv(&ksl->ksl_ref) == 0) {
 		int i;
 
 		for (i = 0; i < ksl->ksl_nsid; i++)
@@ -261,13 +261,13 @@
 void
 kcrsid_hold(credsid_t *kcr)
 {
-	atomic_add_32(&kcr->kr_ref, 1);
+	atomic_inc_32(&kcr->kr_ref);
 }
 
 void
 kcrsid_rele(credsid_t *kcr)
 {
-	if (atomic_add_32_nv(&kcr->kr_ref, -1) == 0) {
+	if (atomic_dec_32_nv(&kcr->kr_ref) == 0) {
 		ksid_index_t i;
 
 		for (i = 0; i < KSID_COUNT; i++)
--- old/usr/src/uts/common/os/strsubr.c	2014-07-28 07:44:51.457365170 -0400
+++ new/usr/src/uts/common/os/strsubr.c	2014-07-28 07:44:51.463574401 -0400
@@ -2653,7 +2653,7 @@
 	rw_enter(&perdm_rwlock, RW_READER);
 	for (p = perdm_list; p != NULL; p = p->dm_next) {
 		if (p->dm_str == str) {	/* found one */
-			atomic_add_32(&(p->dm_ref), 1);
+			atomic_inc_32(&(p->dm_ref));
 			rw_exit(&perdm_rwlock);
 			return (p);
 		}
--- old/usr/src/uts/common/os/sunddi.c	2014-07-28 07:44:51.919238487 -0400
+++ new/usr/src/uts/common/os/sunddi.c	2014-07-28 07:44:51.925569949 -0400
@@ -8092,7 +8092,7 @@
 	(*cp->callbacks.cbo_umem_lock_cleanup)((ddi_umem_cookie_t)cp);
 
 	/* remove the cookie if reference goes to zero */
-	if (atomic_add_long_nv((ulong_t *)(&(cp->cook_refcnt)), -1) == 0) {
+	if (atomic_dec_ulong_nv((ulong_t *)(&(cp->cook_refcnt))) == 0) {
 		kmem_free(cp, sizeof (struct ddi_umem_cookie));
 	}
 }
@@ -8487,7 +8487,7 @@
 		 * case, just return the cookie memory.
 		 */
 		if ((rc != AS_CALLBACK_DELETE_DEFERRED) ||
-		    (atomic_add_long_nv((ulong_t *)(&(p->cook_refcnt)), -1)
+		    (atomic_dec_ulong_nv((ulong_t *)(&(p->cook_refcnt)))
 		    == 0)) {
 			kmem_free(p, sizeof (struct ddi_umem_cookie));
 		}
--- old/usr/src/uts/common/os/task.c	2014-07-28 07:44:52.406379316 -0400
+++ new/usr/src/uts/common/os/task.c	2014-07-28 07:44:52.412339265 -0400
@@ -373,7 +373,7 @@
 
 	mutex_enter(&task_hash_lock);
 	if ((tk = task_find(id, zoneid)) != NULL)
-		atomic_add_32(&tk->tk_hold_count, 1);
+		atomic_inc_32(&tk->tk_hold_count);
 	mutex_exit(&task_hash_lock);
 
 	return (tk);
@@ -406,7 +406,7 @@
 void
 task_hold(task_t *tk)
 {
-	atomic_add_32(&tk->tk_hold_count, 1);
+	atomic_inc_32(&tk->tk_hold_count);
 }
 
 /*
--- old/usr/src/uts/common/os/tlabel.c	2014-07-28 07:44:52.605550847 -0400
+++ new/usr/src/uts/common/os/tlabel.c	2014-07-28 07:44:52.611509305 -0400
@@ -121,7 +121,7 @@
 void
 label_hold(ts_label_t *lab)
 {
-	atomic_add_32(&lab->tsl_ref, 1);
+	atomic_inc_32(&lab->tsl_ref);
 }
 
 /*
@@ -130,7 +130,7 @@
 void
 label_rele(ts_label_t *lab)
 {
-	if (atomic_add_32_nv(&lab->tsl_ref, -1) == 0)
+	if (atomic_dec_32_nv(&lab->tsl_ref) == 0)
 		kmem_cache_free(tslabel_cache, lab);
 }
 
--- old/usr/src/uts/common/os/vmem.c	2014-07-28 07:44:52.787443545 -0400
+++ new/usr/src/uts/common/os/vmem.c	2014-07-28 07:44:52.793455777 -0400
@@ -1453,7 +1453,7 @@
 	vmem_t *vmp, *cur, **vmpp;
 	vmem_seg_t *vsp;
 	vmem_freelist_t *vfp;
-	uint32_t id = atomic_add_32_nv(&vmem_id, 1);
+	uint32_t id = atomic_inc_32_nv(&vmem_id);
 
 	if (vmem_vmem_arena != NULL) {
 		vmp = vmem_alloc(vmem_vmem_arena, sizeof (vmem_t),
@@ -1555,7 +1555,7 @@
 
 	if (vmp->vm_cflags & VMC_POPULATOR) {
 		ASSERT(vmem_populators < VMEM_INITIAL);
-		vmem_populator[atomic_add_32_nv(&vmem_populators, 1) - 1] = vmp;
+		vmem_populator[atomic_inc_32_nv(&vmem_populators) - 1] = vmp;
 		mutex_enter(&vmp->vm_lock);
 		(void) vmem_populate(vmp, vmflag | VM_PANIC);
 		mutex_exit(&vmp->vm_lock);
--- old/usr/src/uts/common/rpc/clnt_clts.c	2014-07-28 07:44:53.013936986 -0400
+++ new/usr/src/uts/common/rpc/clnt_clts.c	2014-07-28 07:44:53.019940142 -0400
@@ -243,7 +243,7 @@
 	sizeof (clts_rcstat_tmpl) / sizeof (kstat_named_t);
 
 #define	RCSTAT_INCR(s, x)			\
-	atomic_add_64(&(s)->x.value.ui64, 1)
+	atomic_inc_64(&(s)->x.value.ui64)
 
 #define	ptoh(p)		(&((p)->cku_client))
 #define	htop(h)		((struct cku_private *)((h)->cl_private))
--- old/usr/src/uts/common/rpc/clnt_cots.c	2014-07-28 07:44:53.260580746 -0400
+++ new/usr/src/uts/common/rpc/clnt_cots.c	2014-07-28 07:44:53.266619490 -0400
@@ -465,7 +465,7 @@
 };
 
 #define	COTSRCSTAT_INCR(p, x)	\
-	atomic_add_64(&(p)->x.value.ui64, 1)
+	atomic_inc_64(&(p)->x.value.ui64)
 
 #define	CLNT_MAX_CONNS	1	/* concurrent connections between clnt/srvr */
 int clnt_max_conns = CLNT_MAX_CONNS;
@@ -2795,7 +2795,7 @@
 	 * We need to increment rpc_kstat_instance atomically to prevent
 	 * two kstats being created with the same instance.
 	 */
-	kstat_instance = atomic_add_32_nv((uint32_t *)&rpc_kstat_instance, 1);
+	kstat_instance = atomic_inc_32_nv((uint32_t *)&rpc_kstat_instance);
 
 	if ((cm_entry->x_ksp = kstat_create_zone("unix", kstat_instance,
 	    "rpc_cots_connections", "rpc", KSTAT_TYPE_NAMED,
--- old/usr/src/uts/common/rpc/svc_clts.c	2014-07-28 07:44:53.563081937 -0400
+++ new/usr/src/uts/common/rpc/svc_clts.c	2014-07-28 07:44:53.568984921 -0400
@@ -141,7 +141,7 @@
 	(struct rpc_clts_server *)(clone_xprt)->xp_master->xp_p2
 
 #define	RSSTAT_INCR(stats, x)	\
-	atomic_add_64(&(stats)->x.value.ui64, 1)
+	atomic_inc_64(&(stats)->x.value.ui64)
 
 /*
  * Create a transport record.
--- old/usr/src/uts/common/rpc/svc_cots.c	2014-07-28 07:44:53.759875075 -0400
+++ new/usr/src/uts/common/rpc/svc_cots.c	2014-07-28 07:44:53.765835661 -0400
@@ -149,7 +149,7 @@
 #define	CLONE2STATS(clone_xprt)	\
 	((struct cots_master_data *)(clone_xprt)->xp_master->xp_p2)->cmd_stats
 #define	RSSTAT_INCR(s, x)	\
-	atomic_add_64(&(s)->x.value.ui64, 1)
+	atomic_inc_64(&(s)->x.value.ui64)
 
 /*
  * Pointer to a transport specific `ready to receive' function in rpcmod
--- old/usr/src/uts/common/rpc/svc_rdma.c	2014-07-28 07:44:53.955992292 -0400
+++ new/usr/src/uts/common/rpc/svc_rdma.c	2014-07-28 07:44:53.961925790 -0400
@@ -182,7 +182,7 @@
 kstat_named_t *rdmarsstat_ptr = (kstat_named_t *)&rdmarsstat;
 uint_t rdmarsstat_ndata = sizeof (rdmarsstat) / sizeof (kstat_named_t);
 
-#define	RSSTAT_INCR(x)	atomic_add_64(&rdmarsstat.x.value.ui64, 1)
+#define	RSSTAT_INCR(x)	atomic_inc_64(&rdmarsstat.x.value.ui64)
 /*
  * Create a transport record.
  * The transport record, output buffer, and private data structure
--- old/usr/src/uts/common/sys/aggr_impl.h	2014-07-28 07:44:54.186304504 -0400
+++ new/usr/src/uts/common/sys/aggr_impl.h	2014-07-28 07:44:54.192130277 -0400
@@ -234,26 +234,26 @@
 } aggr_grp_t;
 
 #define	AGGR_GRP_REFHOLD(grp) {			\
-	atomic_add_32(&(grp)->lg_refs, 1);	\
+	atomic_inc_32(&(grp)->lg_refs);	\
 	ASSERT((grp)->lg_refs != 0);		\
 }
 
 #define	AGGR_GRP_REFRELE(grp) {					\
 	ASSERT((grp)->lg_refs != 0);				\
 	membar_exit();						\
-	if (atomic_add_32_nv(&(grp)->lg_refs, -1) == 0)		\
+	if (atomic_dec_32_nv(&(grp)->lg_refs) == 0)		\
 		aggr_grp_free(grp);				\
 }
 
 #define	AGGR_PORT_REFHOLD(port) {		\
-	atomic_add_32(&(port)->lp_refs, 1);	\
+	atomic_inc_32(&(port)->lp_refs);	\
 	ASSERT((port)->lp_refs != 0);		\
 }
 
 #define	AGGR_PORT_REFRELE(port) {				\
 	ASSERT((port)->lp_refs != 0);				\
 	membar_exit();						\
-	if (atomic_add_32_nv(&(port)->lp_refs, -1) == 0)	\
+	if (atomic_dec_32_nv(&(port)->lp_refs) == 0)	\
 		aggr_port_free(port);				\
 }
 
--- old/usr/src/uts/common/sys/crypto/impl.h	2014-07-28 07:44:54.359327334 -0400
+++ new/usr/src/uts/common/sys/crypto/impl.h	2014-07-28 07:44:54.365393278 -0400
@@ -396,7 +396,7 @@
  * by the policy table has a reference count of one.
  */
 #define	KCF_POLICY_REFHOLD(desc) {		\
-	atomic_add_32(&(desc)->pd_refcnt, 1);	\
+	atomic_inc_32(&(desc)->pd_refcnt);	\
 	ASSERT((desc)->pd_refcnt != 0);		\
 }
 
@@ -407,7 +407,7 @@
 #define	KCF_POLICY_REFRELE(desc) {				\
 	ASSERT((desc)->pd_refcnt != 0);				\
 	membar_exit();						\
-	if (atomic_add_32_nv(&(desc)->pd_refcnt, -1) == 0)	\
+	if (atomic_dec_32_nv(&(desc)->pd_refcnt) == 0)	\
 		kcf_policy_free_desc(desc);			\
 }
 
--- old/usr/src/uts/common/sys/crypto/sched_impl.h	2014-07-28 07:44:54.575582742 -0400
+++ new/usr/src/uts/common/sys/crypto/sched_impl.h	2014-07-28 07:44:54.581576860 -0400
@@ -117,8 +117,8 @@
 	error == CRYPTO_KEY_SIZE_RANGE ||	\
 	error == CRYPTO_NO_PERMISSION)
 
-#define	KCF_ATOMIC_INCR(x)	atomic_add_32(&(x), 1)
-#define	KCF_ATOMIC_DECR(x)	atomic_add_32(&(x), -1)
+#define	KCF_ATOMIC_INCR(x)	atomic_inc_32(&(x))
+#define	KCF_ATOMIC_DECR(x)	atomic_dec_32(&(x))
 
 /*
  * Node structure for synchronous requests.
@@ -210,14 +210,14 @@
 } kcf_areq_node_t;
 
 #define	KCF_AREQ_REFHOLD(areq) {		\
-	atomic_add_32(&(areq)->an_refcnt, 1);	\
+	atomic_inc_32(&(areq)->an_refcnt);	\
 	ASSERT((areq)->an_refcnt != 0);		\
 }
 
 #define	KCF_AREQ_REFRELE(areq) {				\
 	ASSERT((areq)->an_refcnt != 0);				\
 	membar_exit();						\
-	if (atomic_add_32_nv(&(areq)->an_refcnt, -1) == 0)	\
+	if (atomic_dec_32_nv(&(areq)->an_refcnt) == 0)	\
 		kcf_free_req(areq);				\
 }
 
@@ -314,7 +314,7 @@
  * do a hold.
  */
 #define	KCF_CONTEXT_REFHOLD(ictx) {		\
-	atomic_add_32(&(ictx)->kc_refcnt, 1);	\
+	atomic_inc_32(&(ictx)->kc_refcnt);	\
 	ASSERT((ictx)->kc_refcnt != 0);		\
 }
 
@@ -326,7 +326,7 @@
 #define	KCF_CONTEXT_REFRELE(ictx) {				\
 	ASSERT((ictx)->kc_refcnt != 0);				\
 	membar_exit();						\
-	if (atomic_add_32_nv(&(ictx)->kc_refcnt, -1) == 0)	\
+	if (atomic_dec_32_nv(&(ictx)->kc_refcnt) == 0)	\
 		kcf_free_context(ictx);				\
 }
 
--- old/usr/src/uts/common/sys/ib/clients/rdsv3/rdsv3_impl.h	2014-07-28 07:44:54.758082194 -0400
+++ new/usr/src/uts/common/sys/ib/clients/rdsv3/rdsv3_impl.h	2014-07-28 07:44:54.764129175 -0400
@@ -377,7 +377,7 @@
 static inline void
 rdsv3_sk_sock_hold(struct rsock *sk)
 {
-	atomic_add_32(&sk->sk_refcount, 1);
+	atomic_inc_32(&sk->sk_refcount);
 }
 static inline void
 rdsv3_sk_sock_put(struct rsock *sk)
--- old/usr/src/uts/common/syscall/corectl.c	2014-07-28 07:44:54.935172444 -0400
+++ new/usr/src/uts/common/syscall/corectl.c	2014-07-28 07:44:54.941237397 -0400
@@ -23,8 +23,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/proc.h>
 #include <sys/systm.h>
 #include <sys/param.h>
@@ -105,13 +103,13 @@
 void
 corectl_content_hold(corectl_content_t *ccp)
 {
-	atomic_add_32(&ccp->ccc_refcnt, 1);
+	atomic_inc_32(&ccp->ccc_refcnt);
 }
 
 void
 corectl_content_rele(corectl_content_t *ccp)
 {
-	if (atomic_add_32_nv(&ccp->ccc_refcnt, -1) == 0)
+	if (atomic_dec_32_nv(&ccp->ccc_refcnt) == 0)
 		kmem_free(ccp, sizeof (corectl_content_t));
 }
 
@@ -154,13 +152,13 @@
 void
 corectl_path_hold(corectl_path_t *ccp)
 {
-	atomic_add_32(&ccp->ccp_refcnt, 1);
+	atomic_inc_32(&ccp->ccp_refcnt);
 }
 
 void
 corectl_path_rele(corectl_path_t *ccp)
 {
-	if (atomic_add_32_nv(&ccp->ccp_refcnt, -1) == 0) {
+	if (atomic_dec_32_nv(&ccp->ccp_refcnt) == 0) {
 		refstr_rele(ccp->ccp_path);
 		kmem_free(ccp, sizeof (corectl_path_t));
 	}
--- old/usr/src/uts/common/syscall/lwp_sobj.c	2014-07-28 07:44:55.118818104 -0400
+++ new/usr/src/uts/common/syscall/lwp_sobj.c	2014-07-28 07:44:55.125008875 -0400
@@ -195,7 +195,7 @@
 				if ((addr = ent->lwpchan_uaddr) != NULL)
 					lwp_mutex_unregister(addr);
 				kmem_free(ent, sizeof (*ent));
-				atomic_add_32(&lcp->lwpchan_entries, -1);
+				atomic_dec_32(&lcp->lwpchan_entries);
 			} else {
 				prev = &ent->lwpchan_next;
 			}
@@ -468,7 +468,7 @@
 	ent->lwpchan_lwpchan = *lwpchan;
 	ent->lwpchan_next = hashbucket->lwpchan_chain;
 	hashbucket->lwpchan_chain = ent;
-	atomic_add_32(&lcp->lwpchan_entries, 1);
+	atomic_inc_32(&lcp->lwpchan_entries);
 	mutex_exit(&hashbucket->lwpchan_lock);
 	return (1);
 }
--- old/usr/src/uts/common/vm/page_retire.c	2014-07-28 07:44:55.407976443 -0400
+++ new/usr/src/uts/common/vm/page_retire.c	2014-07-28 07:44:55.414023674 -0400
@@ -218,9 +218,9 @@
 static kstat_t  *page_retire_ksp = NULL;
 
 #define	PR_INCR_KSTAT(stat)	\
-	atomic_add_64(&(page_retire_kstat.stat.value.ui64), 1)
+	atomic_inc_64(&(page_retire_kstat.stat.value.ui64))
 #define	PR_DECR_KSTAT(stat)	\
-	atomic_add_64(&(page_retire_kstat.stat.value.ui64), -1)
+	atomic_dec_64(&(page_retire_kstat.stat.value.ui64))
 
 #define	PR_KSTAT_RETIRED_CE	(page_retire_kstat.pr_mce.value.ui64)
 #define	PR_KSTAT_RETIRED_FMA	(page_retire_kstat.pr_fma.value.ui64)
--- old/usr/src/uts/common/vm/seg_kmem.c	2014-07-28 07:44:55.612841395 -0400
+++ new/usr/src/uts/common/vm/seg_kmem.c	2014-07-28 07:44:55.618797491 -0400
@@ -1277,7 +1277,7 @@
 
 		if (lpthrt != 0) {
 			/* try to update the throttle value */
-			lpthrt = atomic_add_long_nv(lpthrtp, 1);
+			lpthrt = atomic_inc_ulong_nv(lpthrtp);
 			if (lpthrt >= segkmem_lpthrottle_max) {
 				lpthrt = atomic_cas_ulong(lpthrtp, lpthrt,
 				    segkmem_lpthrottle_max / 4);
--- old/usr/src/uts/common/vm/seg_kp.c	2014-07-28 07:44:55.828479988 -0400
+++ new/usr/src/uts/common/vm/seg_kp.c	2014-07-28 07:44:55.834433136 -0400
@@ -714,8 +714,7 @@
 				anon_free(kpd->kp_anon, kpd->kp_anon_idx + i,
 				    PAGESIZE);
 				anon_unresv_zone(PAGESIZE, NULL);
-				atomic_add_long(&anon_segkp_pages_resv,
-				    -1);
+				atomic_dec_ulong(&anon_segkp_pages_resv);
 			}
 			TRACE_5(TR_FAC_VM,
 			    TR_ANON_SEGKP, "anon segkp:%p %p %lu %u %u",
@@ -838,7 +837,7 @@
 		 */
 		curthread->t_red_pp = red_pp;
 
-		atomic_add_32(&red_nmapped, 1);
+		atomic_inc_32(&red_nmapped);
 		while (fp - (uintptr_t)curthread->t_stkbase < red_closest) {
 			(void) atomic_cas_32(&red_closest, red_closest,
 			    (uint32_t)(fp - (uintptr_t)curthread->t_stkbase));
@@ -849,7 +848,7 @@
 	stkbase = (caddr_t)(((uintptr_t)curthread->t_stkbase &
 	    (uintptr_t)PAGEMASK) - PAGESIZE);
 
-	atomic_add_32(&red_ndoubles, 1);
+	atomic_inc_32(&red_ndoubles);
 
 	if (fp - (uintptr_t)stkbase < RED_DEEP_THRESHOLD) {
 		/*
@@ -1437,7 +1436,7 @@
 static int
 segkp_mem_config_pre_del(void *arg, pgcnt_t delta_pages)
 {
-	atomic_add_32(&segkp_indel, 1);
+	atomic_inc_32(&segkp_indel);
 	segkp_cache_free();
 	return (0);
 }
@@ -1446,7 +1445,7 @@
 static void
 segkp_mem_config_post_del(void *arg, pgcnt_t delta_pages, int cancelled)
 {
-	atomic_add_32(&segkp_indel, -1);
+	atomic_dec_32(&segkp_indel);
 }
 
 static kphysm_setup_vector_t segkp_mem_config_vec = {
--- old/usr/src/uts/common/vm/seg_spt.c	2014-07-28 07:44:56.041895651 -0400
+++ new/usr/src/uts/common/vm/seg_spt.c	2014-07-28 07:44:56.047857406 -0400
@@ -1088,7 +1088,7 @@
 	 * In either case, we increment softlockcnt on the 'real' segment.
 	 */
 	sptd->spt_pcachecnt++;
-	atomic_add_long((ulong_t *)(&(shmd->shm_softlockcnt)), 1);
+	atomic_inc_ulong((ulong_t *)(&(shmd->shm_softlockcnt)));
 
 	ppa = sptd->spt_ppa;
 	for (an_idx = pg_idx; an_idx < pg_idx + npages; ) {
@@ -1367,7 +1367,7 @@
 	 * In either case, we increment softlockcnt on the 'real' segment.
 	 */
 	sptd->spt_pcachecnt++;
-	atomic_add_long((ulong_t *)(&(shmd->shm_softlockcnt)), 1);
+	atomic_inc_ulong((ulong_t *)(&(shmd->shm_softlockcnt)));
 
 	/*
 	 * We can now drop the sptd->spt_lock since the ppa[]
@@ -1519,7 +1519,7 @@
 	 * Now decrement softlockcnt.
 	 */
 	ASSERT(shmd->shm_softlockcnt > 0);
-	atomic_add_long((ulong_t *)(&(shmd->shm_softlockcnt)), -1);
+	atomic_dec_ulong((ulong_t *)(&(shmd->shm_softlockcnt)));
 
 	if (shmd->shm_softlockcnt <= 0) {
 		if (async || AS_ISUNMAPWAIT(seg->s_as)) {
@@ -2911,7 +2911,7 @@
 		 * to keep this segment resident.
 		 */
 		writer = AS_WRITE_HELD(seg->s_as, &seg->s_as->a_lock);
-		atomic_add_long((ulong_t *)(&(shmd->shm_softlockcnt)), 1);
+		atomic_inc_ulong((ulong_t *)(&(shmd->shm_softlockcnt)));
 		AS_LOCK_EXIT(seg->s_as, &seg->s_as->a_lock);
 
 		mutex_enter(&sptd->spt_lock);
@@ -2935,7 +2935,7 @@
 		/* Regrab the AS_LOCK and release our hold on the segment */
 		AS_LOCK_ENTER(seg->s_as, &seg->s_as->a_lock,
 		    writer ? RW_WRITER : RW_READER);
-		atomic_add_long((ulong_t *)(&(shmd->shm_softlockcnt)), -1);
+		atomic_dec_ulong((ulong_t *)(&(shmd->shm_softlockcnt)));
 		if (shmd->shm_softlockcnt <= 0) {
 			if (AS_ISUNMAPWAIT(seg->s_as)) {
 				mutex_enter(&seg->s_as->a_contents);
--- old/usr/src/uts/common/vm/seg_vn.c	2014-07-28 07:44:56.317299476 -0400
+++ new/usr/src/uts/common/vm/seg_vn.c	2014-07-28 07:44:56.323650163 -0400
@@ -2703,7 +2703,7 @@
 	}
 
 	if (type == F_SOFTLOCK) {
-		atomic_add_long((ulong_t *)&svd->softlockcnt, 1);
+		atomic_inc_ulong((ulong_t *)&svd->softlockcnt);
 	}
 
 	/*
@@ -3064,7 +3064,7 @@
 		anon_array_exit(&cookie);
 
 	if (type == F_SOFTLOCK) {
-		atomic_add_long((ulong_t *)&svd->softlockcnt, -1);
+		atomic_dec_ulong((ulong_t *)&svd->softlockcnt);
 	}
 	return (FC_MAKE_ERR(err));
 }
@@ -8892,11 +8892,11 @@
 
 		if (sftlck_sbase) {
 			ASSERT(svd->softlockcnt_sbase > 0);
-			atomic_add_long((ulong_t *)&svd->softlockcnt_sbase, -1);
+			atomic_dec_ulong((ulong_t *)&svd->softlockcnt_sbase);
 		}
 		if (sftlck_send) {
 			ASSERT(svd->softlockcnt_send > 0);
-			atomic_add_long((ulong_t *)&svd->softlockcnt_send, -1);
+			atomic_dec_ulong((ulong_t *)&svd->softlockcnt_send);
 		}
 
 		/*
@@ -8993,10 +8993,10 @@
 			    npages);
 		}
 		if (sftlck_sbase) {
-			atomic_add_long((ulong_t *)&svd->softlockcnt_sbase, 1);
+			atomic_inc_ulong((ulong_t *)&svd->softlockcnt_sbase);
 		}
 		if (sftlck_send) {
-			atomic_add_long((ulong_t *)&svd->softlockcnt_send, 1);
+			atomic_inc_ulong((ulong_t *)&svd->softlockcnt_send);
 		}
 		SEGVN_LOCK_EXIT(seg->s_as, &svd->lock);
 		*ppp = pplist + adjustpages;
@@ -9186,10 +9186,10 @@
 			wlen = len;
 		}
 		if (sftlck_sbase) {
-			atomic_add_long((ulong_t *)&svd->softlockcnt_sbase, 1);
+			atomic_inc_ulong((ulong_t *)&svd->softlockcnt_sbase);
 		}
 		if (sftlck_send) {
-			atomic_add_long((ulong_t *)&svd->softlockcnt_send, 1);
+			atomic_inc_ulong((ulong_t *)&svd->softlockcnt_send);
 		}
 		if (use_pcache) {
 			(void) seg_pinsert(seg, pamp, paddr, len, wlen, pl,
--- old/usr/src/uts/common/vm/vm_page.c	2014-07-28 07:44:56.857644608 -0400
+++ new/usr/src/uts/common/vm/vm_page.c	2014-07-28 07:44:56.863896645 -0400
@@ -317,7 +317,7 @@
 } memseg_stats;
 
 #define	MEMSEG_STAT_INCR(v) \
-	atomic_add_32(&memseg_stats.v, 1)
+	atomic_inc_32(&memseg_stats.v)
 #else
 #define	MEMSEG_STAT_INCR(x)
 #endif
--- old/usr/src/uts/common/vm/vm_pagelist.c	2014-07-28 07:44:57.272965265 -0400
+++ new/usr/src/uts/common/vm/vm_pagelist.c	2014-07-28 07:44:57.279085191 -0400
@@ -1563,7 +1563,7 @@
 	/*
 	 * Update cage freemem counter
 	 */
-	atomic_add_long(&kcage_freemem, 1);
+	atomic_inc_ulong(&kcage_freemem);
 }
 #else	/* __sparc */
 
@@ -4117,7 +4117,7 @@
 	uint_t	nnofree;
 	uint_t	nnext_pp;
 } repl_page_stats;
-#define	REPL_STAT_INCR(v)	atomic_add_32(&repl_page_stats.v, 1)
+#define	REPL_STAT_INCR(v)	atomic_inc_32(&repl_page_stats.v)
 #else /* REPL_PAGE_STATS */
 #define	REPL_STAT_INCR(v)
 #endif /* REPL_PAGE_STATS */
--- old/usr/src/uts/common/xen/io/xnb.c	2014-07-28 07:44:57.588472205 -0400
+++ new/usr/src/uts/common/xen/io/xnb.c	2014-07-28 07:44:57.594441185 -0400
@@ -1300,7 +1300,7 @@
 
 	DTRACE_PROBE(txbuf_allocated);
 
-	atomic_add_32(&xnbp->xnb_tx_buf_count, 1);
+	atomic_inc_32(&xnbp->xnb_tx_buf_count);
 	xnbp->xnb_tx_buf_outstanding++;
 
 	return (0);
@@ -1326,7 +1326,7 @@
 	ddi_dma_mem_free(&txp->xt_acc_handle);
 	ddi_dma_free_handle(&txp->xt_dma_handle);
 
-	atomic_add_32(&xnbp->xnb_tx_buf_count, -1);
+	atomic_dec_32(&xnbp->xnb_tx_buf_count);
 }
 
 /*
--- old/usr/src/uts/common/xen/io/xnf.c	2014-07-28 07:44:57.817672184 -0400
+++ new/usr/src/uts/common/xen/io/xnf.c	2014-07-28 07:44:57.823706514 -0400
@@ -366,7 +366,7 @@
 	if (gref == INVALID_GRANT_REF) {
 		xnfp->xnf_stat_gref_failure++;
 	} else {
-		atomic_add_64(&xnfp->xnf_stat_gref_outstanding, 1);
+		atomic_inc_64(&xnfp->xnf_stat_gref_outstanding);
 		if (xnfp->xnf_stat_gref_outstanding > xnfp->xnf_stat_gref_peak)
 			xnfp->xnf_stat_gref_peak =
 			    xnfp->xnf_stat_gref_outstanding;
@@ -387,7 +387,7 @@
 	gnttab_release_grant_reference(&xnfp->xnf_gref_head, gref);
 	mutex_exit(&xnfp->xnf_gref_lock);
 
-	atomic_add_64(&xnfp->xnf_stat_gref_outstanding, -1);
+	atomic_dec_64(&xnfp->xnf_stat_gref_outstanding);
 }
 
 /*
@@ -2352,7 +2352,7 @@
 	bdesc->grant_ref = INVALID_GRANT_REF;
 	bdesc->gen = xnfp->xnf_gen;
 
-	atomic_add_64(&xnfp->xnf_stat_buf_allocated, 1);
+	atomic_inc_64(&xnfp->xnf_stat_buf_allocated);
 
 	return (0);
 
@@ -2378,7 +2378,7 @@
 	ddi_dma_mem_free(&bdesc->acc_handle);
 	ddi_dma_free_handle(&bdesc->dma_handle);
 
-	atomic_add_64(&xnfp->xnf_stat_buf_allocated, -1);
+	atomic_dec_64(&xnfp->xnf_stat_buf_allocated);
 }
 
 static xnf_buf_t *
@@ -2412,7 +2412,7 @@
 	    xvdi_get_oeid(bufp->xnfp->xnf_devinfo),
 	    bufp->buf_mfn, readonly ? 1 : 0);
 
-	atomic_add_64(&xnfp->xnf_stat_buf_outstanding, 1);
+	atomic_inc_64(&xnfp->xnf_stat_buf_outstanding);
 
 	return (bufp);
 }
@@ -2429,7 +2429,7 @@
 
 	kmem_cache_free(xnfp->xnf_buf_cache, bufp);
 
-	atomic_add_64(&xnfp->xnf_stat_buf_outstanding, -1);
+	atomic_dec_64(&xnfp->xnf_stat_buf_outstanding);
 }
 
 /*
--- old/usr/src/uts/i86pc/io/psm/uppc.c	2014-07-28 07:44:58.076624490 -0400
+++ new/usr/src/uts/i86pc/io/psm/uppc.c	2014-07-28 07:44:58.082620725 -0400
@@ -317,7 +317,7 @@
 	uchar_t	vectmask;
 
 	if (irqno <= MAX_ISA_IRQ)
-		atomic_add_16(&uppc_irq_shared_table[irqno], 1);
+		atomic_inc_16(&uppc_irq_shared_table[irqno]);
 
 	if (ipl != min_ipl)
 		return (0);
@@ -360,7 +360,7 @@
 	uchar_t	vectmask;
 
 	if (irqno <= MAX_ISA_IRQ)
-		atomic_add_16(&uppc_irq_shared_table[irqno], -1);
+		atomic_dec_16(&uppc_irq_shared_table[irqno]);
 
 	/*
 	 * skip if we are not deleting the last handler
--- old/usr/src/uts/i86pc/os/memnode.c	2014-07-28 07:44:58.274891856 -0400
+++ new/usr/src/uts/i86pc/os/memnode.c	2014-07-28 07:44:58.280941650 -0400
@@ -97,7 +97,7 @@
 	} else {
 		mem_node_config[mnode].physbase = start;
 		mem_node_config[mnode].physmax = end;
-		atomic_add_16(&num_memnodes, 1);
+		atomic_inc_16(&num_memnodes);
 		do {
 			oldmask = memnodes_mask;
 			newmask = memnodes_mask | (1ull << mnode);
@@ -163,7 +163,7 @@
 			omask = memnodes_mask;
 			nmask = omask & ~(1ull << mnode);
 		} while (atomic_cas_64(&memnodes_mask, omask, nmask) != omask);
-		atomic_add_16(&num_memnodes, -1);
+		atomic_dec_16(&num_memnodes);
 		mem_node_config[mnode].exists = 0;
 	}
 }
@@ -239,7 +239,7 @@
 
 	mem_node_config[mnode].physbase = (pfn_t)-1l;
 	mem_node_config[mnode].physmax = 0;
-	atomic_add_16(&num_memnodes, 1);
+	atomic_inc_16(&num_memnodes);
 	do {
 		oldmask = memnodes_mask;
 		newmask = memnodes_mask | (1ull << mnode);
--- old/usr/src/uts/i86pc/sys/rootnex.h	2014-07-28 07:44:58.447425562 -0400
+++ new/usr/src/uts/i86pc/sys/rootnex.h	2014-07-28 07:44:58.453469255 -0400
@@ -51,7 +51,7 @@
 /* atomic increment/decrement to keep track of outstanding binds, etc */
 #ifdef DEBUG
 #define	ROOTNEX_DPROF_INC(addr)		atomic_inc_64(addr)
-#define	ROOTNEX_DPROF_DEC(addr)		atomic_add_64(addr, -1)
+#define	ROOTNEX_DPROF_DEC(addr)		atomic_dec_64(addr)
 #define	ROOTNEX_DPROBE1(name, type1, arg1) \
 	DTRACE_PROBE1(name, type1, arg1)
 #define	ROOTNEX_DPROBE2(name, type1, arg1, type2, arg2) \
--- old/usr/src/uts/i86pc/vm/hat_i86.c	2014-07-28 07:44:58.621459437 -0400
+++ new/usr/src/uts/i86pc/vm/hat_i86.c	2014-07-28 07:44:58.627384078 -0400
@@ -1227,14 +1227,14 @@
 int
 hat_stats_enable(hat_t *hat)
 {
-	atomic_add_32(&hat->hat_stats, 1);
+	atomic_inc_32(&hat->hat_stats);
 	return (1);
 }
 
 void
 hat_stats_disable(hat_t *hat)
 {
-	atomic_add_32(&hat->hat_stats, -1);
+	atomic_dec_32(&hat->hat_stats);
 }
 
 /*
--- old/usr/src/uts/i86pc/vm/hat_i86.h	2014-07-28 07:44:58.928688740 -0400
+++ new/usr/src/uts/i86pc/vm/hat_i86.h	2014-07-28 07:44:58.934677520 -0400
@@ -98,9 +98,9 @@
 typedef struct hat hat_t;
 
 #define	PGCNT_INC(hat, level)	\
-	atomic_add_long(&(hat)->hat_pages_mapped[level], 1);
+	atomic_inc_ulong(&(hat)->hat_pages_mapped[level]);
 #define	PGCNT_DEC(hat, level)	\
-	atomic_add_long(&(hat)->hat_pages_mapped[level], -1);
+	atomic_dec_ulong(&(hat)->hat_pages_mapped[level]);
 
 /*
  * Flags for the hat_flags field
--- old/usr/src/uts/i86pc/vm/htable.c	2014-07-28 07:44:59.109886196 -0400
+++ new/usr/src/uts/i86pc/vm/htable.c	2014-07-28 07:44:59.116287520 -0400
@@ -303,7 +303,7 @@
 	pfn = pp->p_pagenum;
 	if (pfn == PFN_INVALID)
 		panic("ptable_alloc(): Invalid PFN!!");
-	atomic_add_32(&active_ptables, 1);
+	atomic_inc_32(&active_ptables);
 	HATSTAT_INC(hs_ptable_allocs);
 	return (pfn);
 }
@@ -322,7 +322,7 @@
 	 */
 	ASSERT(pfn != PFN_INVALID);
 	HATSTAT_INC(hs_ptable_frees);
-	atomic_add_32(&active_ptables, -1);
+	atomic_dec_32(&active_ptables);
 	if (pp == NULL)
 		panic("ptable_free(): no page for pfn!");
 	ASSERT(PAGE_SHARED(pp));
@@ -460,7 +460,7 @@
 	 * Loop through all user hats. The 1st pass takes cached htables that
 	 * aren't in use. The later passes steal by removing mappings, too.
 	 */
-	atomic_add_32(&htable_dont_cache, 1);
+	atomic_inc_32(&htable_dont_cache);
 	for (pass = 0; pass <= htable_steal_passes && stolen < cnt; ++pass) {
 		threshold = pass * mmu.ptes_per_table / htable_steal_passes;
 		hat = kas.a_hat;
@@ -669,7 +669,7 @@
 			} while (stolen < cnt && h != h_start);
 		}
 	}
-	atomic_add_32(&htable_dont_cache, -1);
+	atomic_dec_32(&htable_dont_cache);
 	return (list);
 }
 
@@ -985,7 +985,7 @@
 	 * Purge the htable cache if just reaping.
 	 */
 	if (!(hat->hat_flags & HAT_FREEING)) {
-		atomic_add_32(&htable_dont_cache, 1);
+		atomic_inc_32(&htable_dont_cache);
 		for (;;) {
 			hat_enter(hat);
 			ht = hat->hat_ht_cached;
@@ -997,7 +997,7 @@
 			hat_exit(hat);
 			htable_free(ht);
 		}
-		atomic_add_32(&htable_dont_cache, -1);
+		atomic_dec_32(&htable_dont_cache);
 		return;
 	}
 
--- old/usr/src/uts/i86pc/vm/htable.h	2014-07-28 07:44:59.362288196 -0400
+++ new/usr/src/uts/i86pc/vm/htable.h	2014-07-28 07:44:59.368346519 -0400
@@ -26,8 +26,6 @@
 #ifndef	_VM_HTABLE_H
 #define	_VM_HTABLE_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifdef	__cplusplus
 extern "C" {
 #endif
@@ -292,8 +290,8 @@
  */
 #define	HTABLE_INC(x)	atomic_inc16((uint16_t *)&x)
 #define	HTABLE_DEC(x)	atomic_dec16((uint16_t *)&x)
-#define	HTABLE_LOCK_INC(ht)	atomic_add_32(&(ht)->ht_lock_cnt, 1)
-#define	HTABLE_LOCK_DEC(ht)	atomic_add_32(&(ht)->ht_lock_cnt, -1)
+#define	HTABLE_LOCK_INC(ht)	atomic_inc_32(&(ht)->ht_lock_cnt)
+#define	HTABLE_LOCK_DEC(ht)	atomic_dec_32(&(ht)->ht_lock_cnt)
 
 #ifdef __xpv
 extern void xen_flush_va(caddr_t va);
--- old/usr/src/uts/i86xpv/io/psm/xpv_uppc.c	2014-07-28 07:44:59.536909233 -0400
+++ new/usr/src/uts/i86xpv/io/psm/xpv_uppc.c	2014-07-28 07:44:59.542932929 -0400
@@ -251,7 +251,7 @@
 	cpuset_t cpus;
 
 	if (irqno >= 0 && irqno <= MAX_ISA_IRQ)
-		atomic_add_16(&xen_uppc_irq_shared_table[irqno], 1);
+		atomic_inc_16(&xen_uppc_irq_shared_table[irqno]);
 
 	/*
 	 * We are called at splhi() so we can't call anything that might end
@@ -284,7 +284,7 @@
 	int err = PSM_SUCCESS;
 
 	if (irqno >= 0 && irqno <= MAX_ISA_IRQ)
-		atomic_add_16(&xen_uppc_irq_shared_table[irqno], -1);
+		atomic_dec_16(&xen_uppc_irq_shared_table[irqno]);
 
 	if (irqno >= PIRQ_BASE && irqno < NR_PIRQS &&
 	    DOMAIN_IS_INITDOMAIN(xen_info)) {
--- old/usr/src/uts/intel/io/scsi/adapters/arcmsr/arcmsr.c	2014-07-28 07:44:59.730646317 -0400
+++ new/usr/src/uts/intel/io/scsi/adapters/arcmsr/arcmsr.c	2014-07-28 07:44:59.737002509 -0400
@@ -1842,7 +1842,7 @@
 	    DDI_FAILURE)
 		return (DDI_FAILURE);
 
-	atomic_add_32(&acb->ccboutstandingcount, 1);
+	atomic_inc_32(&acb->ccboutstandingcount);
 	ccb->ccb_time = (time_t)(ddi_get_time() + pkt->pkt_time);
 
 	ccb->ccb_state = ARCMSR_CCB_START;
@@ -1955,7 +1955,7 @@
 		scsi_hba_pkt_comp(pkt);
 	}
 	if (flag == 1) {
-		atomic_add_32(&acb->ccboutstandingcount, -1);
+		atomic_dec_32(&acb->ccboutstandingcount);
 	}
 }
 
--- 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);
 }
 
 /*
--- old/usr/src/uts/sfmmu/vm/hat_sfmmu.h	2014-07-28 07:45:00.845153819 -0400
+++ new/usr/src/uts/sfmmu/vm/hat_sfmmu.h	2014-07-28 07:45:00.851238098 -0400
@@ -359,13 +359,12 @@
 }
 
 #define	SF_SCD_INCR_REF(scdp) {						\
-	atomic_add_32((volatile uint32_t *)&(scdp)->scd_refcnt, 1);	\
+	atomic_inc_32((volatile uint32_t *)&(scdp)->scd_refcnt);	\
 }
 
 #define	SF_SCD_DECR_REF(srdp, scdp) {				\
 	sf_region_map_t _scd_rmap = (scdp)->scd_region_map;	\
-	if (!atomic_add_32_nv(					\
-	    (volatile uint32_t *)&(scdp)->scd_refcnt, -1)) {	\
+	if (!atomic_dec_32_nv((volatile uint32_t *)&(scdp)->scd_refcnt)) {\
 		sfmmu_destroy_scd((srdp), (scdp), &_scd_rmap);	\
 	}							\
 }
--- old/usr/src/uts/sparc/dtrace/fasttrap_isa.c	2014-07-28 07:45:01.099446626 -0400
+++ new/usr/src/uts/sparc/dtrace/fasttrap_isa.c	2014-07-28 07:45:01.105508785 -0400
@@ -24,8 +24,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/fasttrap_isa.h>
 #include <sys/fasttrap_impl.h>
 #include <sys/dtrace.h>
@@ -1410,7 +1408,7 @@
 		value = dtrace_getreg_win(reg, 1);
 		dtrace_interrupt_enable(cookie);
 
-		atomic_add_64(&fasttrap_getreg_fast_cnt, 1);
+		atomic_inc_64(&fasttrap_getreg_fast_cnt);
 
 		return (value);
 	}
@@ -1435,7 +1433,7 @@
 				if ((long)mpcb->mpcb_spbuf[i] != rp->r_sp)
 					continue;
 
-				atomic_add_64(&fasttrap_getreg_mpcb_cnt, 1);
+				atomic_inc_64(&fasttrap_getreg_mpcb_cnt);
 				return (rwin[i].rw_local[reg - 16]);
 			} while (i > 0);
 		}
@@ -1455,7 +1453,7 @@
 				if ((long)mpcb->mpcb_spbuf[i] != rp->r_sp)
 					continue;
 
-				atomic_add_64(&fasttrap_getreg_mpcb_cnt, 1);
+				atomic_inc_64(&fasttrap_getreg_mpcb_cnt);
 				return (rwin[i].rw_local[reg - 16]);
 			} while (i > 0);
 		}
@@ -1466,7 +1464,7 @@
 		v32[0] = 0;
 	}
 
-	atomic_add_64(&fasttrap_getreg_slow_cnt, 1);
+	atomic_inc_64(&fasttrap_getreg_slow_cnt);
 	return (value);
 
 err:
@@ -1505,7 +1503,7 @@
 	if (dtrace_getotherwin() > 0) {
 		dtrace_putreg_win(reg, value);
 		dtrace_interrupt_enable(cookie);
-		atomic_add_64(&fasttrap_putreg_fast_cnt, 1);
+		atomic_inc_64(&fasttrap_putreg_fast_cnt);
 		return;
 	}
 	dtrace_interrupt_enable(cookie);
@@ -1536,7 +1534,7 @@
 					continue;
 
 				rwin[i].rw_local[reg - 16] = value;
-				atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1);
+				atomic_inc_64(&fasttrap_putreg_mpcb_cnt);
 				return;
 			} while (i > 0);
 		}
@@ -1549,7 +1547,7 @@
 			rwin[mpcb->mpcb_wbcnt].rw_local[reg - 16] = value;
 			mpcb->mpcb_spbuf[mpcb->mpcb_wbcnt] = (caddr_t)rp->r_sp;
 			mpcb->mpcb_wbcnt++;
-			atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1);
+			atomic_inc_64(&fasttrap_putreg_mpcb_cnt);
 			return;
 		}
 	} else {
@@ -1567,7 +1565,7 @@
 					continue;
 
 				rwin[i].rw_local[reg - 16] = v32;
-				atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1);
+				atomic_inc_64(&fasttrap_putreg_mpcb_cnt);
 				return;
 			} while (i > 0);
 		}
@@ -1580,12 +1578,12 @@
 			rwin[mpcb->mpcb_wbcnt].rw_local[reg - 16] = v32;
 			mpcb->mpcb_spbuf[mpcb->mpcb_wbcnt] = (caddr_t)rp->r_sp;
 			mpcb->mpcb_wbcnt++;
-			atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1);
+			atomic_inc_64(&fasttrap_putreg_mpcb_cnt);
 			return;
 		}
 	}
 
-	atomic_add_64(&fasttrap_putreg_slow_cnt, 1);
+	atomic_inc_64(&fasttrap_putreg_slow_cnt);
 	return;
 
 err:
--- old/usr/src/uts/sparc/fpu/fpu_simulator.c	2014-07-28 07:45:01.322056077 -0400
+++ new/usr/src/uts/sparc/fpu/fpu_simulator.c	2014-07-28 07:45:01.328015309 -0400
@@ -42,7 +42,7 @@
 	extern void __dtrace_probe___fpuinfo_##opcode(uint64_t *);	\
 	uint64_t *stataddr = &fpuinfo.opcode.value.ui64;		\
 	__dtrace_probe___fpuinfo_##opcode(stataddr);			\
-	atomic_add_64(&fpuinfo.opcode.value.ui64, 1);			\
+	atomic_inc_64(&fpuinfo.opcode.value.ui64);			\
 }
 
 #define	FPUINFO_KSTAT_PREC(prec, kstat_s, kstat_d, kstat_q)		\
@@ -791,9 +791,9 @@
 	ASSERT((ftt == ftt_ieee) || (ftt == ftt_unfinished) ||
 	    (ftt == ftt_unimplemented));
 	if (ftt == ftt_ieee)
-		atomic_add_64(&fpustat.fpu_ieee_traps.value.ui64, 1);
+		atomic_inc_64(&fpustat.fpu_ieee_traps.value.ui64);
 	else if (ftt == ftt_unfinished)
-		atomic_add_64(&fpustat.fpu_unfinished_traps.value.ui64, 1);
+		atomic_inc_64(&fpustat.fpu_unfinished_traps.value.ui64);
 	else if (ftt == ftt_unimplemented)
-		atomic_add_64(&fpustat.fpu_unimplemented_traps.value.ui64, 1);
+		atomic_inc_64(&fpustat.fpu_unimplemented_traps.value.ui64);
 }
--- old/usr/src/uts/sparc/sys/fpu/fpu_simulator.h	2014-07-28 07:45:01.517526845 -0400
+++ new/usr/src/uts/sparc/sys/fpu/fpu_simulator.h	2014-07-28 07:45:01.523543126 -0400
@@ -379,7 +379,7 @@
 	extern void __dtrace_probe___visinfo_##opcode(uint64_t *);	\
 	uint64_t *stataddr = &visinfo.opcode.value.ui64;		\
 	__dtrace_probe___visinfo_##opcode(stataddr);       		\
-	atomic_add_64(&visinfo.opcode.value.ui64, 1);			\
+	atomic_inc_64(&visinfo.opcode.value.ui64);			\
 }
 
 
--- old/usr/src/uts/sun4/os/memnode.c	2014-07-28 07:45:01.696085741 -0400
+++ new/usr/src/uts/sun4/os/memnode.c	2014-07-28 07:45:01.702156378 -0400
@@ -94,7 +94,7 @@
 	} else {
 		mem_node_config[mnode].physbase = start;
 		mem_node_config[mnode].physmax = end;
-		atomic_add_16(&num_memnodes, 1);
+		atomic_inc_16(&num_memnodes);
 		do {
 			oldmask = memnodes_mask;
 			newmask = memnodes_mask | (1ull << mnode);
@@ -160,7 +160,7 @@
 			omask = memnodes_mask;
 			nmask = omask & ~(1ull << mnode);
 		} while (atomic_cas_64(&memnodes_mask, omask, nmask) != omask);
-		atomic_add_16(&num_memnodes, -1);
+		atomic_dec_16(&num_memnodes);
 		mem_node_config[mnode].exists = 0;
 	}
 }
@@ -230,7 +230,7 @@
 
 	mem_node_config[mnode].physbase = (uint64_t)-1;
 	mem_node_config[mnode].physmax = 0;
-	atomic_add_16(&num_memnodes, 1);
+	atomic_inc_16(&num_memnodes);
 	do {
 		oldmask = memnodes_mask;
 		newmask = memnodes_mask | (1ull << mnode);
--- old/usr/src/uts/sun4/os/prom_subr.c	2014-07-28 07:45:01.868818680 -0400
+++ new/usr/src/uts/sun4/os/prom_subr.c	2014-07-28 07:45:01.875219446 -0400
@@ -318,7 +318,7 @@
 	 * We now hold the prom_cpu lock.  Increment the hold count by one
 	 * and assert our current state before returning to the caller.
 	 */
-	atomic_add_32(&prom_holdcnt, 1);
+	atomic_inc_32(&prom_holdcnt);
 	ASSERT(prom_holdcnt >= 1);
 	prom_thread = curthread;
 }
@@ -345,7 +345,7 @@
 		panic("kern_postprom: prom_holdcnt == 0, owner=%p",
 		    (void *)prom_cpu);
 
-	if (atomic_add_32_nv(&prom_holdcnt, -1) != 0)
+	if (atomic_dec_32_nv(&prom_holdcnt) != 0)
 		return; /* prom lock is held recursively by this CPU */
 
 	if ((boothowto & RB_DEBUG) && prom_exit_enter_debugger)
--- old/usr/src/uts/sun4u/cpu/spitfire.c	2014-07-28 07:45:02.051221871 -0400
+++ new/usr/src/uts/sun4u/cpu/spitfire.c	2014-07-28 07:45:02.057310463 -0400
@@ -4237,7 +4237,7 @@
 
 	for (i = 0; i < mem_ce_simm_size; i++) {
 		if (psimm[i].leaky_bucket_cnt > 0)
-			atomic_add_16(&psimm[i].leaky_bucket_cnt, -1);
+			atomic_dec_16(&psimm[i].leaky_bucket_cnt);
 	}
 	add_leaky_bucket_timeout();
 }
@@ -4382,8 +4382,8 @@
 			} else if (status & ECC_PERSISTENT) {
 				int new_value;
 
-				new_value = atomic_add_16_nv(
-				    &psimm[i].leaky_bucket_cnt, 1);
+				new_value = atomic_inc_16_nv(
+				    &psimm[i].leaky_bucket_cnt);
 				psimm[i].persistent_total++;
 				if (new_value > ecc_softerr_limit) {
 					cmn_err(CE_NOTE, "[AFT0] Most recent %d"
@@ -4394,8 +4394,8 @@
 					    ecc_softerr_limit,
 					    ecc_softerr_interval / 60,
 					    ecc_softerr_interval % 60);
-					atomic_add_16(
-					    &psimm[i].leaky_bucket_cnt, -1);
+					atomic_dec_16(
+					    &psimm[i].leaky_bucket_cnt);
 					page_status = PR_MCE;
 				}
 			} else { /* Intermittent */
--- old/usr/src/uts/sun4u/cpu/us3_common.c	2014-07-28 07:45:02.367306056 -0400
+++ new/usr/src/uts/sun4u/cpu/us3_common.c	2014-07-28 07:45:02.373486380 -0400
@@ -5642,7 +5642,7 @@
 	uint32_t *outstanding = &csmp->chsm_outstanding[index];
 
 	if (*(csi->csi_enable) && (csmp->chsm_enable[index])) {
-		if (atomic_add_32_nv(outstanding, 1) == 1) {
+		if (atomic_inc_32_nv(outstanding) == 1) {
 			xt_one_unchecked(CPU->cpu_id, setsoftint_tl1,
 			    csi->csi_inum, 0);
 		}
--- old/usr/src/uts/sun4u/os/memscrub.c	2014-07-28 07:45:02.782009872 -0400
+++ new/usr/src/uts/sun4u/os/memscrub.c	2014-07-28 07:45:02.787969641 -0400
@@ -1414,7 +1414,7 @@
 	 * atomic_add_32() allows concurrent memory DR operations to use the
 	 * callbacks safely.
 	 */
-	atomic_add_32(&pause_memscrub, 1);
+	atomic_inc_32(&pause_memscrub);
 	ASSERT(pause_memscrub != 0);
 
 	/*
@@ -1423,7 +1423,7 @@
 	(void) new_memscrub(0);		/* retain page retire list */
 
 	/* Restore the pause setting. */
-	atomic_add_32(&pause_memscrub, -1);
+	atomic_dec_32(&pause_memscrub);
 }
 
 /*ARGSUSED*/
@@ -1450,7 +1450,7 @@
 	 * atomic_add_32() allows concurrent memory DR operations to use the
 	 * callbacks safely.
 	 */
-	atomic_add_32(&pause_memscrub, 1);
+	atomic_inc_32(&pause_memscrub);
 	ASSERT(pause_memscrub != 0);
 
 	/*
@@ -1461,7 +1461,7 @@
 	}
 
 	/* Restore the pause setting. */
-	atomic_add_32(&pause_memscrub, -1);
+	atomic_dec_32(&pause_memscrub);
 }
 
 static kphysm_setup_vector_t memscrub_mem_config_vec = {
--- old/usr/src/uts/sun4u/sunfire/io/ac_test.c	2014-07-28 07:45:02.991297074 -0400
+++ new/usr/src/uts/sun4u/sunfire/io/ac_test.c	2014-07-28 07:45:02.997253154 -0400
@@ -24,8 +24,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/types.h>
 #include <sys/conf.h>
 #include <sys/ddi.h>
@@ -192,7 +190,7 @@
 	test->board = softsp->board;
 	test->bank = pkt->bank;
 	test->bufp = kmem_alloc(TEST_PAGESIZE, KM_SLEEP);
-	test->info.handle = atomic_add_32_nv(&mem_test_sequence_id, 1);
+	test->info.handle = atomic_inc_32_nv(&mem_test_sequence_id);
 	(void) drv_getparm(PPID, (ulong_t *)(&(test->info.tester_pid)));
 	test->info.prev_condition = mem_info->condition;
 	test->info.page_size = TEST_PAGESIZE;
@@ -404,7 +402,7 @@
 	}
 
 	/* bump the busy bit */
-	atomic_add_32(&test->in_test, 1);
+	atomic_inc_32(&test->in_test);
 	mutex_exit(&test_mutex);
 
 	/* verify the remaining parameters */
@@ -498,7 +496,7 @@
 	}
 
 read_done:
-	atomic_add_32(&test->in_test, -1);
+	atomic_dec_32(&test->in_test);
 	return (retval);
 }
 
@@ -550,7 +548,7 @@
 	}
 
 	/* bump the busy bit */
-	atomic_add_32(&test->in_test, 1);
+	atomic_inc_32(&test->in_test);
 	mutex_exit(&test_mutex);
 
 	/* verify the remaining parameters */
@@ -602,6 +600,6 @@
 	kpreempt_enable();
 
 write_done:
-	atomic_add_32(&test->in_test, -1);
+	atomic_dec_32(&test->in_test);
 	return (retval);
 }
--- old/usr/src/uts/sun4u/sys/pci/pci_axq.h	2014-07-28 07:45:03.176038272 -0400
+++ new/usr/src/uts/sun4u/sys/pci/pci_axq.h	2014-07-28 07:45:03.182041016 -0400
@@ -27,8 +27,6 @@
 #ifndef	_SYS_PCI_AXQ_H
 #define	_SYS_PCI_AXQ_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/types.h>
 #include <sys/atomic.h>
 
@@ -42,18 +40,18 @@
 					do {\
 						n = p->pbm_pio_counter;\
 					} while (n <= 0);\
-					if (atomic_add_32_nv(\
-					    (uint_t *)&p->pbm_pio_counter, -1)\
+					if (atomic_dec_32_nv(\
+					    (uint_t *)&p->pbm_pio_counter)\
 					    == (n - 1))\
 						break;\
-					atomic_add_32(\
-					    (uint_t *)&p->pbm_pio_counter, 1);\
+					atomic_inc_32(\
+					    (uint_t *)&p->pbm_pio_counter);\
 				}\
 				}
 
 
 
-#define	PIO_LIMIT_EXIT(p)	atomic_add_32((uint_t *)&p->pbm_pio_counter, 1);
+#define	PIO_LIMIT_EXIT(p)	atomic_inc_32((uint_t *)&p->pbm_pio_counter);
 
 extern void pci_axq_setup(ddi_map_req_t *mp, pbm_t *pbm_p);
 extern void pci_axq_pio_limit(pbm_t *pbm_p);
