--- old/usr/src/uts/common/io/ib/mgt/ibcm/ibcm_impl.c	Sun Jun 11 17:03:54 2017
+++ new/usr/src/uts/common/io/ib/mgt/ibcm/ibcm_impl.c	Sun Jun 11 17:03:54 2017
@@ -96,19 +96,6 @@
 int			ibcm_enable_trace = 2;	/* Trace level 4 by default */
 int			ibcm_dtrace = 0; /* conditionally enable more dtrace */
 
-_NOTE(MUTEX_PROTECTS_DATA(ibcm_svc_info_lock, ibcm_svc_info_s::{svc_bind_list
-    svc_ref_cnt svc_to_delete}))
-
-_NOTE(MUTEX_PROTECTS_DATA(ibcm_svc_info_lock, ibcm_svc_bind_s::{sbind_link}))
-
-_NOTE(MUTEX_PROTECTS_DATA(ibcm_trace_mutex, ibcm_conn_trace_s))
-
-_NOTE(DATA_READABLE_WITHOUT_LOCK(ibcm_conn_trace_s))
-
-_NOTE(MUTEX_PROTECTS_DATA(ibcm_trace_print_mutex, ibcm_debug_buf))
-
-_NOTE(DATA_READABLE_WITHOUT_LOCK(ibcm_debug_buf))
-
 /*
  * Initial state is INIT. All hca dr's return success immediately in this
  * state, without adding or deleting any hca's to CM.
@@ -123,36 +110,13 @@
 kmutex_t		ibcm_sa_open_lock;
 kcondvar_t		ibcm_sa_open_cv;
 int			ibcm_sa_timeout_delay = 1;		/* in ticks */
-_NOTE(MUTEX_PROTECTS_DATA(ibcm_sa_open_lock,
-    ibcm_port_info_s::{port_ibmf_saa_hdl port_saa_open_in_progress}))
 
-_NOTE(DATA_READABLE_WITHOUT_LOCK(ibcm_port_info_s::{port_ibmf_saa_hdl}))
-
 /* serialize sm notice callbacks */
 kmutex_t		ibcm_sm_notice_serialize_lock;
 
-_NOTE(LOCK_ORDER(ibcm_sm_notice_serialize_lock ibcm_global_hca_lock))
-
-_NOTE(MUTEX_PROTECTS_DATA(ibcm_global_hca_lock, ibcm_hca_info_s::{hca_state
-    hca_svc_cnt hca_acc_cnt hca_res_cnt hca_next}))
-
-_NOTE(MUTEX_PROTECTS_DATA(ibcm_global_hca_lock,
-    ibcm_port_info_s::{port_ibmf_hdl}))
-
-_NOTE(MUTEX_PROTECTS_DATA(ibcm_sm_notice_serialize_lock,
-    ibcm_port_info_s::{port_event_status}))
-
-_NOTE(DATA_READABLE_WITHOUT_LOCK(ibcm_hca_info_s::{hca_state}))
-_NOTE(DATA_READABLE_WITHOUT_LOCK(
-    ibcm_hca_info_s::{hca_port_info.port_ibmf_hdl}))
-
 /* mutex for CM's qp list management */
 kmutex_t		ibcm_qp_list_lock;
 
-_NOTE(MUTEX_PROTECTS_DATA(ibcm_qp_list_lock, ibcm_port_info_s::{port_qplist}))
-_NOTE(MUTEX_PROTECTS_DATA(ibcm_qp_list_lock, ibcm_qp_list_s))
-_NOTE(MUTEX_PROTECTS_DATA(ibcm_qp_list_lock, ibcm_qp_list_s))
-
 kcondvar_t		ibcm_timeout_list_cv;
 kcondvar_t		ibcm_timeout_thread_done_cv;
 kt_did_t		ibcm_timeout_thread_did;
@@ -162,12 +126,6 @@
 uint8_t			ibcm_timeout_list_flags = 0;
 pri_t			ibcm_timeout_thread_pri = MINCLSYSPRI;
 
-_NOTE(MUTEX_PROTECTS_DATA(ibcm_timeout_list_lock,
-    ibcm_state_data_s::timeout_next))
-
-_NOTE(MUTEX_PROTECTS_DATA(ibcm_timeout_list_lock,
-    ibcm_ud_state_data_s::ud_timeout_next))
-
 /*
  * Flow control logic for open_rc_channel uses the following.
  */
@@ -357,14 +315,6 @@
 
 char	ibcm_debug_buf[IBCM_DEBUG_BUF_SIZE];
 
-_NOTE(SCHEME_PROTECTS_DATA("used in a localized function consistently",
-    ibcm_debug_buf))
-_NOTE(READ_ONLY_DATA(ibcm_taskq))
-
-_NOTE(MUTEX_PROTECTS_DATA(ibcm_timeout_list_lock, ibcm_timeout_list_flags))
-_NOTE(MUTEX_PROTECTS_DATA(ibcm_timeout_list_lock, ibcm_timeout_list_hdr))
-_NOTE(MUTEX_PROTECTS_DATA(ibcm_timeout_list_lock, ibcm_ud_timeout_list_hdr))
-
 #ifdef DEBUG
 int		ibcm_test_mode = 0;	/* set to 1, if running tests */
 #endif
@@ -524,8 +474,6 @@
 static void
 ibcm_init_classportinfo()
 {
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(ibcm_clpinfo));
-
 	ibcm_clpinfo.BaseVersion = IBCM_MAD_BASE_VERSION;
 	ibcm_clpinfo.ClassVersion = IBCM_MAD_CLASS_VERSION;
 
@@ -542,7 +490,6 @@
 	/* For now, redirect fields are set to 0 */
 	/* Trap fields are not applicable to CM, hence set to 0 */
 
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(ibcm_clpinfo));
 	IBTF_DPRINTF_L5(cmlog, "ibcm_init_classportinfo: done");
 }
 
@@ -584,13 +531,8 @@
 	}
 	ibcm_rc_flow_control_init();
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(ibcm_taskq))
 	ibcm_taskq = system_taskq;
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(ibcm_taskq))
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(ibcm_timeout_list_flags))
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(ibcm_timeout_thread_did))
-
 	/* Start the timeout list processing thread */
 	ibcm_timeout_list_flags = 0;
 	t = thread_create(NULL, 0, ibcm_process_tlist, 0, 0, &p0, TS_RUN,
@@ -597,9 +539,6 @@
 	    ibcm_timeout_thread_pri);
 	ibcm_timeout_thread_did = t->t_did;
 
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(ibcm_timeout_list_flags))
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(ibcm_timeout_thread_did))
-
 	/*
 	 * NOTE : if ibt_attach is done after ibcm_init_hcas, then some
 	 * HCA DR events may be lost. CM could call re-init hca list
@@ -725,15 +664,9 @@
 		return (IBCM_FAILURE);
 	}
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(ibcm_timeout_list_hdr))
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(ibcm_ud_timeout_list_hdr))
-
 	ASSERT(ibcm_timeout_list_hdr == NULL);
 	ASSERT(ibcm_ud_timeout_list_hdr == NULL);
 
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(ibcm_timeout_list_hdr))
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(ibcm_ud_timeout_list_hdr))
-
 	/* Release any pending asyncs on ibcm_global_hca_lock */
 	ibcm_finit_state = IBCM_FINIT_SUCCESS;
 	mutex_exit(&ibcm_global_hca_lock);
@@ -833,8 +766,6 @@
 
 	ASSERT(MUTEX_HELD(&ibcm_global_hca_lock));
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*hcap))
-
 	status = ibt_query_hca_byguid(hcaguid, &hca_attrs);
 	if (status != IBT_SUCCESS) {
 		IBTF_DPRINTF_L2(cmlog, "ibcm_hca_attach: "
@@ -903,8 +834,6 @@
 	 */
 	hcap->hca_state = IBCM_HCA_ACTIVE;
 
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*hcap))
-
 	IBTF_DPRINTF_L3(cmlog, "ibcm_hca_attach: ATTACH Done");
 }
 
@@ -2032,13 +1961,9 @@
 	portp->port_saa_open_in_progress = 1;
 	mutex_exit(&ibcm_sa_open_lock);
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(portp->port_event_status))
-
 	/* The assumption is that we're getting event notifications */
 	portp->port_event_status = IBMF_SAA_EVENT_STATUS_MASK_PRODUCER_SM;
 
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(portp->port_event_status))
-
 	ibt_status = ibt_get_port_state_byguid(portp->port_hcap->hca_guid,
 	    portp->port_num, &portp->port_sgid0, NULL);
 	if (ibt_status != IBT_SUCCESS) {
@@ -2128,8 +2053,6 @@
 
 	ASSERT(MUTEX_HELD(&ibcm_global_hca_lock));
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(hcap->hca_port_info))
-
 	if (hcap->hca_port_info[port_index].port_ibmf_hdl == NULL) {
 		/* Register with IBMF */
 		ibmf_reg = &hcap->hca_port_info[port_index].port_ibmf_reg;
@@ -2416,10 +2339,8 @@
 	case IBT_EVENT_PORT_UP:
 		mutex_exit(&ibcm_global_hca_lock);
 		pup = kmem_alloc(sizeof (ibcm_port_up_t), KM_SLEEP);
-		_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*pup))
 		pup->pup_hca_guid = eventp->ev_hca_guid;
 		pup->pup_port = eventp->ev_port;
-		_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*pup))
 		(void) taskq_dispatch(ibcm_taskq,
 		    ibcm_service_record_rewrite_task, pup, TQ_SLEEP);
 		ibcm_path_cache_purge();
