Print this page
8368 remove warlock leftovers from usr/src/uts

@@ -482,14 +482,10 @@
                                     ibt_qp_hdl_t ibt_qp,
                                     ibt_cep_modify_flags_t flags,
                                     ibt_qp_info_t *qp_attr);
 #endif
 
-/*      Warlock annotations */
-
-_NOTE(READ_ONLY_DATA(ibt_arej_info_u))
-
 /*
  * ibcm_process_incoming_mad:
  *      The CM callback that is invoked by IBMF, when a valid CM MAD arrives
  *      on any of the registered ibmf handles by CM.
  *

@@ -564,12 +560,10 @@
                         IBTF_DPRINTF_L2(cmlog, "ibcm_process_incoming_mad: "
                             "ibmf_free_msg failed %d", ibmf_status);
                 return;
         }
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*cm_mad_addr))
-
         /* allocate memory for internal MAD address buffer */
         cm_mad_addr = &loc_mad_addr;
         bzero(cm_mad_addr, sizeof (ibcm_mad_addr_t));
 
         cm_mad_addr->port_num = portp->port_num;

@@ -644,12 +638,10 @@
 
 #ifdef  DEBUG
         ibcm_decode_tranid(b2h64(in_mad_hdr->TransactionID), NULL);
 #endif
 
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*cm_mad_addr))
-
         /*
          * The following are valid combination of Method type
          * and attribute id in the received MAD :-
          *      o ClassPortInfo with Get method
          *      o CM messages with Send method

@@ -708,12 +700,10 @@
 ibcm_taskq_args_t ibcm_recv_array[IBCM_RECV_MAX + 1];
 int ibcm_get, ibcm_put;
 int ibcm_recv_total;
 int ibcm_recv_queued;
 
-_NOTE(READ_ONLY_DATA(ibcm_taskq_args_t))
-
 static int
 ibcm_recv_dequeue(ibmf_handle_t *ibmf_handlep, ibmf_msg_t **msgpp, void **argsp)
 {
         ibcm_taskq_args_t *tq;
 

@@ -741,15 +731,13 @@
                 next = 0;
         if (next != ibcm_get) {
                 ibcm_recv_queued++;
                 ibcm_put = next;
                 tq = ibcm_recv_array + next;
-                _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*tq))
                 tq->tq_ibmf_handle = ibmf_handle;
                 tq->tq_ibmf_msgp = msgp;
                 tq->tq_args = args;
-                _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*tq))
                 return (1);
         } else {
                 return (0);
         }
 }

@@ -865,15 +853,13 @@
                         else    /* don't enqueue if no threads are running */
                                 rv = 0;
                         mutex_exit(&ibcm_recv_mutex);
                         return (rv);
                 }
-                _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*tq))
                 tq->tq_ibmf_handle = ibmf_handle;
                 tq->tq_ibmf_msgp = msgp;
                 tq->tq_args = args;
-                _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*tq))
                 if (taskq_dispatch(ibcm_taskq, ibcm_recv_task, tq,
                     TQ_NOQUEUE | TQ_NOSLEEP) == 0) {    /* dispatch failed */
                         mutex_enter(&ibcm_recv_mutex);
                         if (--ibcm_recv_tasks == 0) {
                                 /* try the dispatch again, after a tick */

@@ -978,12 +964,10 @@
             " remote_qpn = %x", remote_comid, remote_qpn);
 
         IBTF_DPRINTF_L4(cmlog, "ibcm_process_req_msg: remote_hcaguid = %llX",
             remote_hca_guid);
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*statep))
-
 new_req:
         /* allocate the local_comid before proceeding */
         if (ibcm_alloc_comid(hcap, &local_comid) != IBCM_SUCCESS) {
                 ibcm_build_n_post_rej_mad(input_madp,
                     b2h32(req_msgp->req_local_comm_id), cm_mad_addr,

@@ -1011,12 +995,10 @@
                 IBTF_DPRINTF_L4(cmlog, "ibcm_process_req_msg: New statep 0x%p"
                     " created", statep);
 
                 psn24_timeout5_retry3 = b2h32(req_msgp->req_starting_psn_plus);
 
-                _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*statep))
-
                 /* if ibmf msg allocation fails, delete the statep */
                 if (ibcm_alloc_out_msg(cm_mad_addr->ibmf_hdl,
                     &statep->stored_msg, MAD_METHOD_SEND) != IBT_SUCCESS) {
 
                         IBCM_REF_CNT_DECR(statep);

@@ -1251,12 +1233,10 @@
 
                 /* statep ref cnt decremented in the func below */
                 ibcm_handle_cep_req_response(statep, response,
                     reject_reason, arej_info_len);
 
-                _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*statep))
-
                 return;
 
         } else {
                 rw_exit(&hcap->hca_state_rwlock);
                 ibcm_free_comid(hcap, local_comid);

@@ -1393,12 +1373,10 @@
  */
 void
 ibcm_handle_cep_req_response(ibcm_state_data_t *statep, ibcm_status_t response,
     ibt_cm_reason_t reject_reason, uint8_t arej_info_len)
 {
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*statep))
-
         if (response == IBCM_SEND_REP)
                 ibcm_post_rep_mad(statep);
         else {
                 ASSERT(response == IBCM_SEND_REJ);
                 IBTF_DPRINTF_L4(cmlog, "ibcm_handle_cep_req_response: statep %p"

@@ -1407,12 +1385,10 @@
                 ibcm_post_rej_mad(statep,
                     reject_reason, IBT_CM_FAILURE_REQ,
                     NULL, arej_info_len);
         }
 
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*statep))
-
         mutex_enter(&statep->state_mutex);
         IBCM_REF_CNT_DECR(statep);
         mutex_exit(&statep->state_mutex);
 }
 

@@ -1526,12 +1502,10 @@
                         (void) untimeout(timer_val);
                 } else {
                         mutex_exit(&statep->state_mutex);
                 }
 
-                _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*statep))
-
                 /* Initialize the remote destination QPN for further MADs */
                 statep->stored_reply_addr.rcvd_addr.ia_remote_qno =
                     cm_mad_addr->rcvd_addr.ia_remote_qno;
                 statep->remote_qpn = b2h32(rep_msgp->rep_local_qpn_plus) >> 8;
                 statep->remote_comid = b2h32(rep_msgp->rep_local_comm_id);

@@ -1755,12 +1729,10 @@
                         return;
                 }
                 ibcm_handle_cep_rep_response(statep, response,
                     reject_reason, arej_info_len, rep_msgp);
 
-                _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*statep))
-
                 return;
 
         } else if (statep->state == IBCM_STATE_DELETE) {
 
                 mutex_exit(&statep->state_mutex);

@@ -2637,12 +2609,10 @@
         ibcm_state_data_t       *statep = vstatep;
         ibcm_dreq_msg_t         *dreq_msgp;
 
         ASSERT(statep->dreq_msg != NULL);
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*dreq_msgp))
-
         /* Fill in the DREQ message */
         dreq_msgp = (ibcm_dreq_msg_t *)IBCM_OUT_MSGP(statep->dreq_msg);
         dreq_msgp->dreq_local_comm_id = h2b32(statep->local_comid);
         dreq_msgp->dreq_remote_comm_id = h2b32(statep->remote_comid);
         dreq_msgp->dreq_remote_qpn_eecn_plus = h2b32(statep->remote_qpn << 8);

@@ -2661,12 +2631,10 @@
 
         IBCM_OUT_HDRP(statep->dreq_msg)->TransactionID =
             h2b64(ibcm_generate_tranid(IBCM_INCOMING_DREQ, statep->local_comid,
             0));
 
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*dreq_msgp))
-
         /* post the first DREQ via timeout callback */
         mutex_enter(&statep->state_mutex);
 
         statep->state = IBCM_STATE_DREQ_SENT;
         cv_broadcast(&statep->block_mad_cv);

@@ -2698,22 +2666,18 @@
 {
         ibcm_drep_msg_t *drep_msgp;
 
         drep_msgp = (ibcm_drep_msg_t *)IBCM_OUT_MSGP(statep->drep_msg);
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*drep_msgp))
-
         IBTF_DPRINTF_L4(cmlog, "ibcm_post_drep_mad:");
 
         /* Fill up DREP fields */
         drep_msgp->drep_local_comm_id = h2b32(statep->local_comid);
         drep_msgp->drep_remote_comm_id = h2b32(statep->remote_comid);
         IBCM_OUT_HDRP(statep->drep_msg)->AttributeID =
             h2b16(IBCM_INCOMING_DREP + IBCM_ATTR_BASE_ID);
 
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*drep_msgp))
-
         ibcm_insert_trace(statep, IBCM_TRACE_OUTGOING_DREP);
 
         /* Post the DREP MAD now.  */
         ibcm_post_rc_mad(statep, statep->drep_msg, ibcm_post_drep_complete,
             statep);

@@ -3024,12 +2988,10 @@
 
         /* Message printed if connection gets REJed */
         IBTF_DPRINTF_L3(cmlog, "ibcm_post_rej_mad: "
             "statep = %p, reject_reason = %d", statep, reject_reason);
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*rej_msg))
-
         /* Initialize rej_msg fields */
         rej_msg->rej_local_comm_id = h2b32(statep->local_comid);
         rej_msg->rej_remote_comm_id = h2b32(statep->remote_comid);
         rej_msg->rej_msg_type_plus = (which_msg & 0x3) << 6;
         rej_msg->rej_reject_info_len_plus = arej_info_len << 1;

@@ -3039,12 +3001,10 @@
                 bcopy(addl_rej_info, rej_msg->rej_addl_rej_info, arej_info_len);
 
         IBCM_OUT_HDRP(statep->stored_msg)->AttributeID =
             h2b16(IBCM_INCOMING_REJ + IBCM_ATTR_BASE_ID);
 
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*rej_msg))
-
         mutex_enter(&statep->state_mutex);
 
         /* signal any waiting close channels with blocking or no callbacks  */
         statep->close_done = B_TRUE;
         statep->close_nocb_state = IBCM_FAIL;

@@ -3099,12 +3059,10 @@
                 IBTF_DPRINTF_L2(cmlog, "ibcm_build_n_post_rej_mad: "
                     "ibcm_alloc_out_msg failed");
                 return;
         }
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*rej_msg))
-
         IBCM_OUT_HDRP(cm_rej_msg)->TransactionID =
             ((ib_mad_hdr_t *)(input_madp))->TransactionID;
 
         /* Initialize rej_msg fields */
         rej_msg = (ibcm_rej_msg_t *)IBCM_OUT_MSGP(cm_rej_msg);

@@ -3115,12 +3073,10 @@
         rej_msg->rej_rejection_reason = h2b16(reject_reason);
 
         IBCM_OUT_HDRP(cm_rej_msg)->AttributeID =
             h2b16(IBCM_INCOMING_REJ + IBCM_ATTR_BASE_ID);
 
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*rej_msg))
-
         ibcm_build_reply_mad_addr(cm_mad_addr, &rej_reply_addr);
 
         if (rej_reply_addr.cm_qp_entry != NULL) {
                 (void) ibcm_post_mad(cm_rej_msg, &rej_reply_addr, NULL, NULL);
                 ibcm_release_qp(rej_reply_addr.cm_qp_entry);

@@ -3148,12 +3104,10 @@
                 IBTF_DPRINTF_L2(cmlog, "ibcm_post_rej_ver_mismatch: "
                     "ibcm_alloc_out_msg failed");
                 return;
         }
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*rej_msg))
-
         IBCM_OUT_HDRP(cm_rej_msg)->TransactionID =
             ((ib_mad_hdr_t *)(input_madp))->TransactionID;
 
         /* Initialize rej_msg fields */
         rej_msg = (ibcm_rej_msg_t *)IBCM_OUT_MSGP(cm_rej_msg);

@@ -3166,12 +3120,10 @@
 
         IBCM_OUT_HDRP(cm_rej_msg)->AttributeID =
             h2b16(IBCM_INCOMING_REJ + IBCM_ATTR_BASE_ID);
         IBCM_OUT_HDRP(cm_rej_msg)->Status = h2b16(MAD_STATUS_BAD_VERSION);
 
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*rej_msg))
-
         ibcm_build_reply_mad_addr(cm_mad_addr, &rej_reply_addr);
         if (rej_reply_addr.cm_qp_entry != NULL) {
                 (void) ibcm_post_mad(cm_rej_msg, &rej_reply_addr, NULL, NULL);
                 ibcm_release_qp(rej_reply_addr.cm_qp_entry);
         }

@@ -3197,23 +3149,19 @@
         ibmf_msg_t      *mra_msg = NULL;
         boolean_t       ret = B_FALSE;
 
         IBTF_DPRINTF_L4(cmlog, "ibcm_post_rep_mad: statep 0x%p", statep);
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*rep_msgp))
-
         /*
          * All other REP fields, other that the 2 below, are filled in
          * the ibcm_cep_state_req() function.
          */
         rep_msgp->rep_local_comm_id = h2b32(statep->local_comid);
         rep_msgp->rep_remote_comm_id = h2b32(statep->remote_comid);
         IBCM_OUT_HDRP(statep->stored_msg)->AttributeID =
             h2b16(IBCM_INCOMING_REP + IBCM_ATTR_BASE_ID);
 
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*rep_msgp))
-
         /*
          * Changing state and attempt to delete the mra msg must be done
          * together holding the state_mutex
          */
         mutex_enter(&statep->state_mutex);

@@ -3284,21 +3232,17 @@
         ibmf_msg_t      *mra_msg = NULL;
         boolean_t       ret = B_FALSE;
 
         IBTF_DPRINTF_L4(cmlog, "ibcm_post_rtu_mad: statep 0x%p", statep);
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*rtu_msg))
-
         rtu_msg = (ibcm_rtu_msg_t *)IBCM_OUT_MSGP(statep->stored_msg);
 
         rtu_msg->rtu_local_comm_id = h2b32(statep->local_comid);
         rtu_msg->rtu_remote_comm_id = h2b32(statep->remote_comid);
         IBCM_OUT_HDRP(statep->stored_msg)->AttributeID =
             h2b16(IBCM_INCOMING_RTU + IBCM_ATTR_BASE_ID);
 
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*rtu_msg))
-
         mutex_enter(&statep->state_mutex);
 
         /* Now, attempt to delete the mra_msg, if there is one allocated */
         if (statep->mra_msg != NULL) {
                 if (!(statep->send_mad_flags & IBCM_MRA_POST_BUSY)) {

@@ -3481,24 +3425,16 @@
                 if (statep->recycle_arg) {
                         struct ibcm_taskq_recycle_arg_s *recycle_arg;
 
                         recycle_arg = statep->recycle_arg;
 
-                        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(
-                            statep->recycle_arg))
                         statep->recycle_arg = NULL;
-                        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(statep->recycle_arg))
 
                         /* if possible, do not slow down calling recycle func */
                         if (taskq_dispatch(ibcm_taskq, ibcm_process_rc_recycle,
                             recycle_arg, TQ_NOQUEUE | TQ_NOSLEEP) == 0) {
-
-                                _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(
-                                    statep->recycle_arg))
                                 statep->recycle_arg = recycle_arg;
-                                _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(
-                                    statep->recycle_arg))
                                 ibcm_add_tlist(statep);
                                 return;
                         }
                 }
 

@@ -4259,13 +4195,11 @@
                         cv_wait(&ibcm_timeout_list_cv, &ibcm_timeout_list_lock);
                         CALLB_CPR_SAFE_END(&cprinfo, &ibcm_timeout_list_lock);
                 }
         }
 
-#ifndef __lock_lint
         CALLB_CPR_EXIT(&cprinfo);       /* mutex_exit */
-#endif
 }
 
 
 /*
  * ibcm_timeout_client_cb:

@@ -4285,13 +4219,11 @@
         if ((statep->state == IBCM_STATE_DELETE) &&
             (statep->recycle_arg != NULL)) {
                 struct ibcm_taskq_recycle_arg_s *recycle_arg;
 
                 recycle_arg = statep->recycle_arg;
-                _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(statep->recycle_arg))
                 statep->recycle_arg = NULL;
-                _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(statep->recycle_arg))
                 mutex_exit(&statep->state_mutex);
                 (void) ibcm_process_rc_recycle(recycle_arg);
                 ibcm_delete_state_data(statep);
                 return;
         }

@@ -4507,20 +4439,16 @@
          * - if lookup fails it creates a new ud_state struct
          * No need to hold a lock across the call to ibcm_find_sidr_entry() as
          * the list lock is held in that function to find the matching entry.
          */
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(srch_sidr))
-
         srch_sidr.srch_lid = lid;
         srch_sidr.srch_gid = gid;
         srch_sidr.srch_grh_exists = cm_mad_addr->grh_exists;
         srch_sidr.srch_req_id = req_id;
         srch_sidr.srch_mode = IBCM_PASSIVE_MODE;
 
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(srch_sidr))
-
         rw_enter(&hcap->hca_sidr_list_lock, RW_WRITER);
         state_lookup_status = ibcm_find_sidr_entry(&srch_sidr, hcap, &ud_statep,
             IBCM_FLAG_LOOKUP_AND_ADD);
         rw_exit(&hcap->hca_sidr_list_lock);
 

@@ -4530,12 +4458,10 @@
         if (state_lookup_status == IBCM_LOOKUP_NEW) {
 
                 /* Increment hca's resource count */
                 ibcm_inc_hca_res_cnt(hcap);
 
-                _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*ud_statep))
-
                 /*
                  * Allocate CM MAD for a response
                  * This MAD is deallocated on state structure delete
                  * and re-used for all outgoing MADs for this connection.
                  * If MAD allocation fails, delete the ud statep

@@ -4648,12 +4574,10 @@
                         return;
                 }
 
                 ibcm_post_sidr_rep_mad(ud_statep, sidr_status);
 
-                _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*ud_statep))
-
                 mutex_enter(&ud_statep->ud_state_mutex);
                 IBCM_UD_REF_CNT_DECR(ud_statep);
                 mutex_exit(&ud_statep->ud_state_mutex);
         } else {
                 ASSERT(state_lookup_status == IBCM_LOOKUP_EXISTS);

@@ -4712,20 +4636,16 @@
          */
         IBTF_DPRINTF_L4(cmlog, "ibcm_process_sidr_rep: lid=%x, (%llX, %llX), "
             "grh = %x, id = %x", lid, gid.gid_prefix, gid.gid_guid,
             cm_mad_addr->grh_exists, sidr_repp->sidr_rep_request_id);
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(srch_sidr))
-
         srch_sidr.srch_lid = lid;
         srch_sidr.srch_gid = gid;
         srch_sidr.srch_grh_exists = cm_mad_addr->grh_exists;
         srch_sidr.srch_req_id = b2h32(sidr_repp->sidr_rep_request_id);
         srch_sidr.srch_mode = IBCM_ACTIVE_MODE;
 
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(srch_sidr))
-
         rw_enter(&hcap->hca_sidr_list_lock, RW_READER);
         status = ibcm_find_sidr_entry(&srch_sidr, hcap, &ud_statep,
             IBCM_FLAG_LOOKUP);
         rw_exit(&hcap->hca_sidr_list_lock);
 

@@ -4859,12 +4779,10 @@
             (ibcm_sidr_rep_msg_t *)IBCM_OUT_MSGP(ud_statep->ud_stored_msg);
         clock_t                 timer_value;
 
         IBTF_DPRINTF_L5(cmlog, "ibcm_post_sidr_rep_mad:");
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*sidr_repp))
-
         IBCM_OUT_HDRP(ud_statep->ud_stored_msg)->AttributeID =
             h2b16(IBCM_INCOMING_SIDR_REP + IBCM_ATTR_BASE_ID);
 
         /*
          * Initialize SIDR REP message. (Other fields were

@@ -4874,12 +4792,10 @@
         tmp_svc_id = h2b64(ud_statep->ud_svc_id);
         bcopy(&tmp_svc_id, sidr_repp->sidr_rep_service_id, sizeof (tmp_svc_id));
 
         sidr_repp->sidr_rep_rep_status = (uint8_t)status;
 
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*sidr_repp))
-
         /* post the SIDR REP MAD */
         ibcm_post_ud_mad(ud_statep, ud_statep->ud_stored_msg, NULL, NULL);
 
         timer_value = ibt_ib2usec(ibcm_max_sidr_rep_store_time);
         /*

@@ -5056,12 +4972,10 @@
 ibcm_build_reply_mad_addr(ibcm_mad_addr_t *inp_mad_addr,
     ibcm_mad_addr_t *out_mad_addr)
 {
         IBTF_DPRINTF_L5(cmlog, "ibcm_build_reply_mad_addr:");
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*out_mad_addr))
-
         bcopy(inp_mad_addr, out_mad_addr, sizeof (ibcm_mad_addr_t));
 
         /* Swap the GIDs in the GRH */
         if (inp_mad_addr->grh_exists == B_TRUE) {
                 ib_gid_t sgid = inp_mad_addr->grh_hdr.ig_sender_gid;

@@ -5077,12 +4991,10 @@
          * and pkey
          */
         out_mad_addr->cm_qp_entry =
             ibcm_find_qp(inp_mad_addr->cm_qp_entry->qp_port->port_hcap,
             inp_mad_addr->port_num, inp_mad_addr->rcvd_addr.ia_p_key);
-
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*out_mad_addr))
 }
 
 
 /*
  * ibcm_post_rc_mad

@@ -6271,19 +6183,15 @@
         IBTF_DPRINTF_L4(cmlog, "ibcm_cep_state_req: Client handler returned %d"
             " statep 0x%p", cb_status, statep);
 
         if (cb_status == IBT_CM_DEFER) {
 
-                _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(statep->defer_cm_msg))
-
                 if (statep->defer_cm_msg == NULL)
                         statep->defer_cm_msg =
                             kmem_zalloc(IBCM_MSG_SIZE, KM_SLEEP);
                 bcopy(cm_req_msgp, statep->defer_cm_msg, IBCM_MSG_SIZE);
 
-                _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(statep->defer_cm_msg))
-
                 /*
                  * unblock any blocked cm proceed api calls. Do not access
                  * statep after cv_signal
                  */
                 mutex_enter(&statep->state_mutex);

@@ -6357,14 +6265,10 @@
         /* client handler gave CM ok */
         if (cb_status == IBT_CM_ACCEPT) {
                 ibcm_rep_msg_t  *rep_msgp = (ibcm_rep_msg_t *)
                     IBCM_OUT_MSGP(statep->stored_msg);
 
-
-                _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*statep))
-                _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*rep_msgp))
-
                 /*
                  * Check first if ret_args make sense. If not, bailout
                  * here rather than going along and panicing later.
                  */
                 channel = clnt_info->reply_event->rep.cm_channel;

@@ -6645,24 +6549,19 @@
                         bcopy(clnt_info->priv_data, rep_msgp->rep_private_data,
                             min(IBT_REP_PRIV_DATA_SZ,
                             clnt_info->priv_data_len));
                 }
 
-                _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*statep))
-                _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*rep_msgp))
-
                 return (IBCM_SEND_REP);
         }
 
         /* REJ message */
         rej_msgp = (ibcm_rej_msg_t *)IBCM_OUT_MSGP(statep->stored_msg);
 
         IBTF_DPRINTF_L4(cmlog, "ibcm_process_cep_req_cm_hdlr: statep %p REJ "
             "priv len %x", statep, clnt_info->priv_data_len);
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*rej_msgp))
-
         /* if priv_data_len != 0 use priv_data to copy back to rej_priv_data */
         if (clnt_info->priv_data_len != 0) {
                 bcopy(clnt_info->priv_data, rej_msgp->rej_private_data,
                     min(IBT_REJ_PRIV_DATA_SZ, clnt_info->priv_data_len));
         }

@@ -6716,12 +6615,10 @@
                 }
         }
 
         rej_msgp->rej_msg_type_plus = IBT_CM_FAILURE_REQ << 6;
 
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*rej_msgp))
-
         return (IBCM_SEND_REJ);
 }
 
 /*
  * ibcm_cep_state_rep:

@@ -6896,16 +6793,13 @@
 
                 IBTF_DPRINTF_L5(cmlog, "ibcm_process_cep_rep_cm_hdlr: statep %p"
                     " rnr_retry_cnt = 0x%x", statep,
                     cm_rep_msgp->rep_rnr_retry_cnt_plus >> 5);
 
-                _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*statep))
                 statep->starting_psn =
                     b2h32(cm_rep_msgp->rep_starting_psn_plus) >> 8;
 
-                _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*statep))
-
                 /* Call IBTL CM's qp modify function from Init to RTR */
                 if (ibcm_invoke_qp_modify(statep,
                     (ibcm_req_msg_t *)IBCM_OUT_MSGP(statep->stored_msg),
                     cm_rep_msgp) != IBT_SUCCESS) {
 

@@ -6949,12 +6843,10 @@
 
                 *reject_reason = IBT_CM_SUCCESS;
                 return (rval);
         }
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*rej_msgp))
-
         /* Fill up the REJ fields, from ret_args */
         rej_msgp = (ibcm_rej_msg_t *)IBCM_OUT_MSGP(statep->stored_msg);
         rej_msgp->rej_msg_type_plus = IBT_CM_FAILURE_REP << 6;
 
         /* if priv_len != 0 use priv_data to copy back to rej_priv_data */

@@ -6965,20 +6857,14 @@
         if (clnt_info->reply_event != NULL)
                 *arej_len =
                     min(clnt_info->reply_event->rej.ari_consumer.rej_ari_len,
                     IBT_CM_ADDL_REJ_LEN);
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(clnt_info->reply_event->rej))
-
         if (*arej_len != 0)     /* asserts that clnt_info->reply_event != 0 */
                 bcopy(clnt_info->reply_event->rej.ari_consumer.rej_ari,
                     &rej_msgp->rej_addl_rej_info, *arej_len);
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(clnt_info->reply_event->rej))
-
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*rej_msgp))
-
         rval = IBCM_SEND_REJ;
 
         /* Disassociate statep and QP */
         IBCM_SET_CHAN_PRIVATE(statep->channel, NULL);
 

@@ -7350,13 +7236,10 @@
         uint16_t        rej_reason = b2h16(rej_msgp->rej_rejection_reason);
         uint8_t         ari_len = rej_msgp->rej_reject_info_len_plus >> 1;
         ibcm_classportinfo_msg_t tclp;
         ibt_arej_info_t *cf_addl = &failed->cf_additional;
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*cf_addl))
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(failed->cf_arej_info_valid))
-
         failed->cf_arej_info_valid = B_FALSE;
 
         IBTF_DPRINTF_L3(cmlog, "ibcm_copy_addl_rej: rej_reason = %d "
             "ari_len = %d", rej_reason, ari_len);
 

@@ -7459,23 +7342,18 @@
                     b2h32(*(uint32_t *)&rej_msgp->rej_addl_rej_info) >> 12;
                 break;
         default:
                 break;
         }
-
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(failed->cf_arej_info_valid))
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*cf_addl))
 }
 
 
 /* Used to copy classportinfo to MAD from client initialized args */
 static void
 ibcm_init_clp_to_mad(ibcm_classportinfo_msg_t *clp, ibt_redirect_info_t *rinfo)
 {
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*clp))
-
         bcopy(&ibcm_clpinfo, clp, sizeof (ibcm_clpinfo));
 
         clp->RedirectGID_hi = h2b64(rinfo->rdi_gid.gid_prefix);
         clp->RedirectGID_lo = h2b64(rinfo->rdi_gid.gid_guid);
         clp->RedirectTC_plus =

@@ -7487,12 +7365,10 @@
         clp->RedirectP_Key = h2b16(rinfo->rdi_pkey);
 
         IBTF_DPRINTF_L4(cmlog, "ibcm_init_clp_to_mad: RedirectGID= %llX:%llX,"
             " RedirectLID= 0x%lX", clp->RedirectGID_hi, clp->RedirectGID_lo,
             clp->RedirectLID);
-
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*clp))
 }
 
 
 /* Used to initialize classportinfo to be returned to clients, from MAD */
 static void

@@ -7724,18 +7600,13 @@
                             ud_clnt_info->redirect_infop);
                 }
                 return;
         }
 
-
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*sidr_repp))
-
         sidr_repp->sidr_rep_qkey =
             h2b32(ud_clnt_info->ud_qkey);
         sidr_repp->sidr_rep_qpn_plus = h2b32(ud_clnt_info->ud_qpn << 8);
-
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*sidr_repp))
 }
 
 /*
  * ibcm_sidr_rep_ud_handler:
  *      Invoke Client's UD handler For SIDR_REP msg

@@ -7975,12 +7846,10 @@
         ibcm_clnt_reply_info_t  clnt_info;
 
 
         IBTF_DPRINTF_L4(cmlog, "ibcm_cep_state_lap: statep 0x%p", statep);
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*apr_msg))
-
         /* If APM is not supported, return error */
         if (!(statep->hcap->hca_caps & IBT_HCA_AUTO_PATH_MIG)) {
                 apr_msg->apr_ap_status = IBT_CM_AP_NOT_SUPPORTED;
                 return (IBCM_SEND_APR);
         }

@@ -7992,12 +7861,10 @@
                     "not match remote's remote_qpn %x", statep->local_qpn,
                     b2h32(lap_msg->lap_remote_qpn_eecn_plus) >> 8);
                 return (IBCM_SEND_APR);
         }
 
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*apr_msg))
-
         /* Fill up the event */
         bzero(&event, sizeof (event));
         event.cm_type = IBT_CM_EVENT_LAP_RCV;
         event.cm_channel = statep->channel;
         event.cm_session_id = statep;

@@ -8012,20 +7879,14 @@
         cb_status = statep->cm_handler(statep->state_cm_private, &event,
             &ret_args, apr_msg->apr_private_data, IBT_APR_PRIV_DATA_SZ);
 
         IBTF_DPRINTF_L3(cmlog, "ibcm_cep_state_lap: cb_status = %d", cb_status);
         if (cb_status == IBT_CM_DEFER) {
-
-                _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(statep->defer_cm_msg))
-
                 if (statep->defer_cm_msg == NULL)
                         statep->defer_cm_msg =
                             kmem_zalloc(IBCM_MSG_SIZE, KM_SLEEP);
                 bcopy(lap_msg, statep->defer_cm_msg, IBCM_MSG_SIZE);
-
-                _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(statep->defer_cm_msg))
-
                 /* unblock any blocked cm proceed api calls */
                 mutex_enter(&statep->state_mutex);
                 statep->clnt_proceed = IBCM_UNBLOCK;
                 cv_broadcast(&statep->block_client_cv);
                 mutex_exit(&statep->state_mutex);

@@ -8118,12 +7979,10 @@
         ibt_adds_vect_t         *adds;
 
         if (cb_status == IBT_CM_DEFAULT)
                 cb_status = IBT_CM_REJECT;
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*apr_msg))
-
         /* verify status */
         apr_msg->apr_addl_info_len = 0;
         if (cb_status == IBT_CM_ACCEPT) {
                 apr_msg->apr_ap_status = IBT_CM_AP_LOADED;
         } else if (cb_status == IBT_CM_REJECT) {

@@ -8230,11 +8089,10 @@
                 apr_msg->apr_ap_status = IBT_CM_AP_REJECT;
                 IBTF_DPRINTF_L2(cmlog, "ibcm_process_cep_lap_cm_hdlr:"
                     " ibt_modify_qp() returned = %d", status);
                 return;
         }
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*apr_msg))
 }
 
 
 /*
  * ibcm_post_apr_mad:

@@ -8248,21 +8106,17 @@
 void
 ibcm_post_apr_mad(ibcm_state_data_t *statep)
 {
         ibcm_apr_msg_t  *apr_msgp;
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*apr_msgp))
-
         apr_msgp = (ibcm_apr_msg_t *)IBCM_OUT_MSGP(statep->lapr_msg);
 
         apr_msgp->apr_local_comm_id = h2b32(statep->local_comid);
         apr_msgp->apr_remote_comm_id = h2b32(statep->remote_comid);
         IBCM_OUT_HDRP(statep->lapr_msg)->AttributeID =
             h2b16(IBCM_INCOMING_APR + IBCM_ATTR_BASE_ID);
 
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*apr_msgp))
-
         ibcm_insert_trace(statep, IBCM_TRACE_OUTGOING_APR);
 
         ibcm_post_rc_mad(statep, statep->lapr_msg, ibcm_post_apr_complete,
             statep);
 }

@@ -8371,12 +8225,10 @@
         *ari_valid = B_FALSE;
 
         IBTF_DPRINTF_L3(cmlog, "ibcm_set_apr_arej: apr_status = %d "
             "ari_len = %d", ap_status, ari_len);
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*ari))
-
         switch (ap_status) {
         case IBT_CM_AP_REDIRECT:
                 if (ari_len < sizeof (ibcm_classportinfo_msg_t))
                         break;
                 *ari_valid = B_TRUE;

@@ -8440,11 +8292,10 @@
                 ari->ari_sl = apr_msgp->apr_addl_info[0] >> 4;
                 break;
         default:
                 break;
         }
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*ari))
 }
 
 /*
  * ibcm_cep_state_apr:
  *      This call processes an incoming APR message

@@ -8658,11 +8509,10 @@
         IBTF_DPRINTF_L3(cmlog, "ibcm_sync_lapr_idle:"
             "statep %p state %d ap_state %d", statep, statep->state,
             statep->ap_state);
 
         ASSERT(MUTEX_HELD(&statep->state_mutex));
-        _NOTE(LOCK_RELEASED_AS_SIDE_EFFECT(&statep->state_mutex))
 
         /* Busy AP states on active/passive sides */
         if ((statep->ap_state == IBCM_AP_STATE_LAP_RCVD) ||
             (statep->ap_state == IBCM_AP_STATE_APR_RCVD) ||
             (statep->ap_state == IBCM_AP_STATE_MRA_LAP_SENT) ||