--- old/usr/src/uts/common/io/ib/adapters/hermon/hermon_mr.c	Sun Jun 11 17:03:25 2017
+++ new/usr/src/uts/common/io/ib/adapters/hermon/hermon_mr.c	Sun Jun 11 17:03:25 2017
@@ -227,7 +227,6 @@
 		goto mrshared_fail2;
 	}
 	mr = (hermon_mrhdl_t)rsrc->hr_addr;
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mr))
 
 	/*
 	 * Setup and validate the memory region access flags.  This means
@@ -320,7 +319,6 @@
 	mr->mr_mttrefcntp = mrhdl->mr_mttrefcntp;
 	mutex_exit(&mrhdl->mr_lock);
 	bind = &mr->mr_bindinfo;
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bind))
 	mtt = mr->mr_mttrsrcp;
 
 	/*
@@ -497,7 +495,6 @@
 		goto fmralloc_fail2;
 	}
 	mr = (hermon_mrhdl_t)rsrc->hr_addr;
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mr))
 
 	/*
 	 * Setup and validate the memory region access flags.  This means
@@ -624,7 +621,6 @@
 	rindx = mpt->hr_indx;
 	hermon_index(index1, index2, rindx, icm_table, i);
 	dma_info = icm_table->icm_dma[index1] + index2;
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mpt))
 	mpt->hr_addr = (void *)((uintptr_t)(dma_info->vaddr + i * mpt->hr_len));
 
 	*mrhdl = mr;
@@ -991,8 +987,6 @@
 	hermon_hw_dmpt_t	mpt_entry;
 	uint32_t		lkey;
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*attr))
-
 	mutex_enter(&mr->mr_lock);
 
 	/*
@@ -1277,7 +1271,6 @@
 		goto mwalloc_fail2;
 	}
 	mw = (hermon_mwhdl_t)rsrc->hr_addr;
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mw))
 
 	/*
 	 * Calculate an "unbound" RKey from MPT index.  In much the same way
@@ -1376,7 +1369,6 @@
 	rsrc	= mw->mr_rsrcp;
 	pd	= mw->mr_pdhdl;
 	mutex_exit(&mw->mr_lock);
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mw))
 
 	/*
 	 * Reclaim the MPT entry from hardware.  Note: in general, it is
@@ -1433,7 +1425,6 @@
 	 * time) is incredibly small.
 	 * And, lastly, we'd like to make this into a "random" key
 	 */
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(hermon_memkey_cnt))
 	tmp_key = (hermon_memkey_cnt++) << HERMON_MEMKEY_SHIFT;
 	tmp_indx = indx & 0xffffff;
 	return (tmp_key | tmp_indx);
@@ -1562,7 +1553,6 @@
 		goto mrcommon_fail2;
 	}
 	mr = (hermon_mrhdl_t)rsrc->hr_addr;
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mr))
 
 	/*
 	 * Setup and validate the memory region access flags.  This means
@@ -1616,9 +1606,6 @@
 			goto mrcommon_fail3;
 		}
 
-		_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bind))
-		_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bind->bi_buf))
-
 		bind->bi_buf = ddi_umem_iosetup(umem_cookie, 0, umem_len,
 		    B_WRITE, 0, 0, NULL, DDI_UMEM_SLEEP);
 		if (bind->bi_buf == NULL) {
@@ -1628,9 +1615,6 @@
 		bind->bi_type = HERMON_BINDHDL_UBUF;
 		bind->bi_buf->b_flags |= B_READ;
 
-		_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*bind->bi_buf))
-		_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*bind))
-
 		umapdb = hermon_umap_db_alloc(state->hs_instance,
 		    (uint64_t)(uintptr_t)umem_cookie, MLNX_UMAP_MRMEM_RSRC,
 		    (uint64_t)(uintptr_t)rsrc);
@@ -1644,7 +1628,6 @@
 	 * Setup the bindinfo for the mtt bind call
 	 */
 	bh = &mr->mr_bindinfo;
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bh))
 	bcopy(bind, bh, sizeof (hermon_bind_info_t));
 	bh->bi_bypass = bind_type;
 	status = hermon_mr_mtt_bind(state, bh, bind_dmahdl, &mtt,
@@ -1674,7 +1657,6 @@
 	}
 	mr->mr_mttrefcntp = mtt_refcnt;
 	swrc_tmp = (hermon_sw_refcnt_t *)mtt_refcnt->hr_addr;
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*swrc_tmp))
 	HERMON_MTT_REFCNT_INIT(swrc_tmp);
 
 	mtt_addr = (mtt->hr_indx << HERMON_MTT_SIZE_SHIFT);
@@ -1805,9 +1787,7 @@
 		 */
 		if (bind->bi_type == HERMON_BINDHDL_UBUF) {
 			freerbuf(bind->bi_buf);
-			_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bind))
 			bind->bi_type = HERMON_BINDHDL_NONE;
-			_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*bind))
 		}
 		ddi_umem_unlock(umem_cookie);
 	}
@@ -1880,7 +1860,6 @@
 		goto mrcommon_fail2;
 	}
 	mr = (hermon_mrhdl_t)rsrc->hr_addr;
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mr))
 	bzero(mr, sizeof (*mr));
 
 	/*
@@ -2059,7 +2038,6 @@
 		goto alloclkey_fail2;
 	}
 	mr = (hermon_mrhdl_t)rsrc->hr_addr;
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mr))
 	bzero(mr, sizeof (*mr));
 	mr->mr_bindinfo.bi_type = HERMON_BINDHDL_LKEY;
 
@@ -2087,7 +2065,6 @@
 	}
 	mr->mr_mttrefcntp = mtt_refcnt;
 	swrc_tmp = (hermon_sw_refcnt_t *)mtt_refcnt->hr_addr;
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*swrc_tmp))
 	HERMON_MTT_REFCNT_INIT(swrc_tmp);
 
 	mtt_addr = (mtt->hr_indx << HERMON_MTT_SIZE_SHIFT);
@@ -2388,8 +2365,6 @@
 	uint_t			sleep, dereg_level;
 	int			status;
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bind))
-
 	/*
 	 * Check here to see if the memory region corresponds to a userland
 	 * mapping.  Reregistration of userland memory regions is not
@@ -2989,7 +2964,6 @@
 				goto mrrereghelp_fail;
 			}
 			swrc_new = (hermon_sw_refcnt_t *)mtt_refcnt->hr_addr;
-			_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*swrc_new))
 			HERMON_MTT_REFCNT_INIT(swrc_new);
 		} else {
 			mtt_refcnt = mr->mr_mttrefcntp;
@@ -3105,8 +3079,6 @@
 	    bind->bi_type == HERMON_BINDHDL_BUF ||
 	    bind->bi_type == HERMON_BINDHDL_UBUF);
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bind))
-
 	/* Set the callback flag appropriately */
 	callback = (sleep == HERMON_SLEEP) ? DDI_DMA_SLEEP : DDI_DMA_DONTWAIT;
 
@@ -3192,7 +3164,6 @@
 {
 	int	status;
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bind))
 	/* there is nothing to unbind for alloc_lkey */
 	if (bind->bi_type == HERMON_BINDHDL_LKEY)
 		return;
@@ -3203,12 +3174,10 @@
 	 * it's required to free it here. Reset bi_type to HERMON_BINDHDL_NONE
 	 * not to free it again later.
 	 */
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bind))
 	if (bind->bi_type == HERMON_BINDHDL_UBUF) {
 		freerbuf(bind->bi_buf);
 		bind->bi_type = HERMON_BINDHDL_NONE;
 	}
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*bind))
 
 	/*
 	 * Unbind the DMA memory for the region
@@ -3323,8 +3292,6 @@
 			addr += pagesize;
 			if (addr == 0) {
 				static int do_once = 1;
-				_NOTE(SCHEME_PROTECTS_DATA("safe sharing",
-				    do_once))
 				if (do_once) {
 					do_once = 0;
 					cmn_err(CE_NOTE, "probable error in "
