--- old/usr/src/uts/common/io/ib/mgt/ibcm/ibcm_path.c	Sun Jun 11 17:03:55 2017
+++ new/usr/src/uts/common/io/ib/mgt/ibcm/ibcm_path.c	Sun Jun 11 17:03:55 2017
@@ -48,9 +48,6 @@
 	ibcm_dest_t	dest[1];
 } ibcm_dinfo_t;
 
-_NOTE(SCHEME_PROTECTS_DATA("Temporary path storage", ibcm_dinfo_s))
-_NOTE(READ_ONLY_DATA(ibt_path_attr_s))
-
 typedef struct ibcm_path_tqargs_s {
 	ibt_path_attr_t		attr;
 	ibt_path_info_t		*paths;
@@ -447,8 +444,6 @@
 		return (IBT_INSUFF_KERNEL_RESOURCE);
 	}
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*path_tq))
-
 	bcopy(attrp, &path_tq->attr, sizeof (ibt_path_attr_t));
 
 	if (attrp->pa_num_dgids) {
@@ -477,8 +472,6 @@
 	path_tq->func = func;
 	path_tq->arg = arg;
 
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*path_tq))
-
 	if (func != NULL) {		/* Non-Blocking */
 		IBTF_DPRINTF_L3(cmlog, "ibcm_handle_get_path: Non Blocking");
 		if (taskq_dispatch(ibcm_taskq, ibcm_process_async_get_paths,
@@ -737,15 +730,11 @@
 			dinfo->dest[i].d_gid = d_gids_p[j++];
 	}
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*p_arg))
-
 	/* IBTF allocates memory for path_info in case of Async Get Paths */
 	if (p_arg->paths == NULL)
 		p_arg->paths = kmem_zalloc(sizeof (ibt_path_info_t) * max_paths,
 		    KM_SLEEP);
 
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*p_arg))
-
 	/*
 	 * Get list of active HCA<->Port list, that matches input specified attr
 	 */
@@ -794,9 +783,7 @@
 			retval = IBT_HCA_PORT_NOT_ACTIVE;
 			goto path_error1;
 		}
-		_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*slistp))
 		slistp[i].p_saa_hdl = saa_handle;
-		_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*slistp))
 	}
 
 	/*
@@ -1437,8 +1424,6 @@
 		gid_ptr++;
 	}
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mpr_req))
-
 	mpr_req->SGIDCount = sgid_cnt;
 	c_mask = SA_MPR_COMPMASK_SGIDCOUNT;
 
@@ -1554,9 +1539,6 @@
 	}
 
 	/* we will not specify how many records we want. */
-
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*mpr_req))
-
 	IBTF_DPRINTF_L3(cmlog, "ibcm_get_multi_pathrec: CMask: %llX Pkey: %X",
 	    c_mask, mpr_req->P_Key);
 
@@ -1968,15 +1950,11 @@
 static void
 ibcm_fill_svcinfo(sa_service_record_t *sr_resp, ibcm_dest_t *dest)
 {
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*dest))
-
 	dest->d_gid = sr_resp->ServiceGID;
 	dest->d_sid = sr_resp->ServiceID;
 	ibcm_swizzle_to_srv(sr_resp->ServiceData, &dest->d_sdata);
 	dest->d_pkey = sr_resp->ServiceP_Key;
 
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*dest))
-
 	IBTF_DPRINTF_L3(cmlog, "ibcm_fill_svcinfo: SID(%llX), GID(%llX:%llX)"
 	    "\n\tSvcPKey 0x%X", dest->d_sid, dest->d_gid.gid_prefix,
 	    dest->d_gid.gid_guid, dest->d_pkey);
@@ -2770,8 +2748,6 @@
 
 	ASSERT(mpr_req != NULL);
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mpr_req))
-
 	gid_ptr = (ib_gid_t *)(((uchar_t *)mpr_req) +
 	    sizeof (sa_multipath_record_t));
 
@@ -2886,8 +2862,6 @@
 	mpr_req->IndependenceSelector = 1;
 	c_mask |= SA_MPR_COMPMASK_REVERSIBLE | SA_MPR_COMPMASK_INDEPSEL;
 
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*mpr_req))
-
 	IBTF_DPRINTF_L3(cmlog, "ibt_get_alt_path: CMask: 0x%llX", c_mask);
 
 	/* NOTE: We will **NOT** specify how many records we want. */
@@ -2967,12 +2941,8 @@
 				continue;
 
 			/* Update some leftovers */
-			_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*api_p))
-
 			api_p->ap_alt_pkt_lt = pr_resp->PacketLifeTime;
 
-			_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*api_p))
-
 			rec_found = 1;
 			break;
 		}
@@ -3028,8 +2998,6 @@
 	ib_gid_t	d_gid[1];
 } ibcm_ip_dinfo_t;
 
-_NOTE(SCHEME_PROTECTS_DATA("Temporary path storage", ibcm_ip_dinfo_s))
-
 /* Prototype Declarations. */
 static void ibcm_process_get_ip_paths(void *tq_arg);
 static ibt_status_t ibcm_get_ip_spr(ibcm_ip_path_tqargs_t *,
@@ -3434,8 +3402,6 @@
 		gid_ptr++;
 	}
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mpr_req))
-
 	mpr_req->SGIDCount = sgid_cnt;
 	c_mask = SA_MPR_COMPMASK_SGIDCOUNT;
 
@@ -3543,8 +3509,6 @@
 
 	/* we will not specify how many records we want. */
 
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*mpr_req))
-
 	IBTF_DPRINTF_L3(cmlog, "ibcm_get_ip_mpr: CMask: %llX Pkey: %X",
 	    c_mask, mpr_req->P_Key);
 
@@ -3849,8 +3813,6 @@
 	/* "i" will get us num_dest count. */
 	dinfo->num_dest = i;
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*p_arg))
-
 	/*
 	 * IBTF allocates memory for path_info & src_ip in case of
 	 * Async Get IP Paths
@@ -3863,8 +3825,6 @@
 			    sizeof (ibt_path_ip_src_t) * max_paths, KM_SLEEP);
 	}
 
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*p_arg))
-
 	IBTF_DPRINTF_L3(cmlog, "ibcm_process_get_ip_paths: HCA (%llX, %d)",
 	    sl->p_hca_guid, sl->p_port_num);
 
@@ -3898,9 +3858,7 @@
 			retval = IBT_HCA_PORT_NOT_ACTIVE;
 			goto ippath_error3;
 		}
-		_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*sl))
 		sl[i].p_saa_hdl = saa_handle;
-		_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*sl))
 	}
 
 	/* Get Path Records. */
@@ -3928,9 +3886,7 @@
 		ibt_path_info_t *tmp_path_p;
 		ibt_path_ip_src_t	*tmp_src_ip_p;
 
-		_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*p_arg))
 		p_arg->retval = retval;
-		_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*p_arg))
 
 		if (retval == IBT_INSUFF_DATA) {
 			/*
@@ -4134,7 +4090,6 @@
 		return (IBT_INSUFF_KERNEL_RESOURCE);
 	}
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*path_tq))
 	bcopy(attrp, &path_tq->attr, sizeof (ibt_ip_path_attr_t));
 
 	path_tq->attr.ipa_dst_ip = (ibt_ip_addr_t *)(((uchar_t *)path_tq) +
@@ -4164,8 +4119,6 @@
 		cv_init(&path_tq->ip_cv, NULL, CV_DRIVER, NULL);
 	}
 
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*path_tq))
-
 	sleep_flag = ((func == NULL) ? TQ_SLEEP : TQ_NOSLEEP);
 	ret = taskq_dispatch(ibcm_taskq, ibcm_process_get_ip_paths, path_tq,
 	    sleep_flag);
@@ -4447,8 +4400,6 @@
 
 	ASSERT(mpr_req != NULL);
 
-	_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mpr_req))
-
 	gid_ptr = (ib_gid_t *)(((uchar_t *)mpr_req) +
 	    sizeof (sa_multipath_record_t));
 
@@ -4563,8 +4514,6 @@
 	mpr_req->IndependenceSelector = 1;
 	c_mask |= SA_MPR_COMPMASK_REVERSIBLE | SA_MPR_COMPMASK_INDEPSEL;
 
-	_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*mpr_req))
-
 	IBTF_DPRINTF_L3(cmlog, "ibt_get_ip_alt_path: CMask: 0x%llX", c_mask);
 
 	/* NOTE: We will **NOT** specify how many records we want. */
@@ -4644,12 +4593,8 @@
 				continue;
 
 			/* Update some leftovers */
-			_NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*api_p))
-
 			api_p->ap_alt_pkt_lt = pr_resp->PacketLifeTime;
 
-			_NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*api_p))
-
 			rec_found = 1;
 			break;
 		}
@@ -4675,33 +4620,4 @@
 	IBTF_DPRINTF_L3(cmlog, "ibt_get_ip_alt_path: Done (status %d)", retval);
 
 	return (retval);
-}
-
-
-/* Routines for warlock */
-
-/* ARGSUSED */
-static void
-ibcm_dummy_path_handler(void *arg, ibt_status_t retval, ibt_path_info_t *paths,
-    uint8_t num_path)
-{
-	ibcm_path_tqargs_t	dummy_path;
-
-	dummy_path.func = ibcm_dummy_path_handler;
-
-	IBTF_DPRINTF_L5(cmlog, "ibcm_dummy_path_handler: "
-	    "dummy_path.func %p", dummy_path.func);
-}
-
-/* ARGSUSED */
-static void
-ibcm_dummy_ip_path_handler(void *arg, ibt_status_t retval,
-    ibt_path_info_t *paths, uint8_t num_path, ibt_path_ip_src_t *src_ip)
-{
-	ibcm_ip_path_tqargs_t	dummy_path;
-
-	dummy_path.func = ibcm_dummy_ip_path_handler;
-
-	IBTF_DPRINTF_L5(cmlog, "ibcm_dummy_ip_path_handler: "
-	    "dummy_path.func %p", dummy_path.func);
 }
