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

@@ -46,13 +46,10 @@
         uint8_t         num_dest;
         ib_pkey_t       p_key;
         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;
         uint8_t                 *num_paths_p;
         ibt_path_handler_t      func;

@@ -445,12 +442,10 @@
                 IBTF_DPRINTF_L2(cmlog, "ibcm_handle_get_path: "
                     "Unable to allocate memory for local usage.");
                 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) {
                 path_tq->attr.pa_dgids = (ib_gid_t *)(((uchar_t *)path_tq) +
                     sizeof (ibcm_path_tqargs_t));

@@ -475,12 +470,10 @@
         path_tq->paths = paths;
         path_tq->num_paths_p = num_path_p;
         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,
                     path_tq, TQ_NOSLEEP) == 0) {
                         IBTF_DPRINTF_L2(cmlog, "ibcm_handle_get_path: "

@@ -735,19 +728,15 @@
                         dinfo->dest[i].d_gid = p_arg->attr.pa_dgids[i];
                 else
                         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
          */
         IBTF_DPRINTF_L3(cmlog, "ibcm_process_get_paths: Get Paths from \n HCA "
             "(%llX:%d), SGID  %llX:%llX", p_arg->attr.pa_hca_guid,

@@ -792,13 +781,11 @@
                             "SAA HDL NULL, HCA (%llX:%d) NOT ACTIVE",
                             slistp[i].p_hca_guid, slistp[i].p_port_num);
                         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))
         }
 
         /*
          * If Service Name or Service ID are specified, first retrieve
          * Service Records.

@@ -1435,12 +1422,10 @@
                     "(%llX:%llX)", i, gid_ptr->gid_prefix, gid_ptr->gid_guid);
 
                 gid_ptr++;
         }
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mpr_req))
-
         mpr_req->SGIDCount = sgid_cnt;
         c_mask = SA_MPR_COMPMASK_SGIDCOUNT;
 
         /* DGIDs */
         for (i = 0; i < dinfo->num_dest; i++) {

@@ -1552,13 +1537,10 @@
                 mpr_req->IndependenceSelector = 1;
                 c_mask |= SA_MPR_COMPMASK_INDEPSEL;
         }
 
         /* 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);
 
         /* Contact SA Access to retrieve Path Records. */
         access_args.sq_attr_id = SA_MULTIPATHRECORD_ATTRID;

@@ -1966,19 +1948,15 @@
 
 
 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);
 }
 

@@ -2768,12 +2746,10 @@
 
         mpr_req = kmem_zalloc(template_len, KM_SLEEP);
 
         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));
 
         /* SGID */
         if (new_sgid.gid_guid == 0)

@@ -2884,12 +2860,10 @@
 
         mpr_req->Reversible = 1;        /* We always get REVERSIBLE paths. */
         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. */
 
         IBTF_DPRINTF_L3(cmlog, "ibt_get_alt_path: Primary: MTU %d, PKey[%d]="

@@ -2965,16 +2939,12 @@
                         }
                         if (retval != IBT_SUCCESS)
                                 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;
                 }
                 kmem_free(results_p, length);
         }

@@ -3026,12 +2996,10 @@
 typedef struct ibcm_ip_dinfo_s {
         uint8_t         num_dest;
         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 *,
     ibtl_cm_port_list_t *, ibcm_ip_dinfo_t *, uint8_t *, ibt_path_info_t *);
 static ibt_status_t ibcm_get_ip_mpr(ibcm_ip_path_tqargs_t *,

@@ -3432,12 +3400,10 @@
                     i, gid_ptr->gid_prefix, gid_ptr->gid_guid);
 
                 gid_ptr++;
         }
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mpr_req))
-
         mpr_req->SGIDCount = sgid_cnt;
         c_mask = SA_MPR_COMPMASK_SGIDCOUNT;
 
         /* DGIDs */
         for (i = 0; i < dgid_cnt; i++) {

@@ -3541,12 +3507,10 @@
                 c_mask |= SA_MPR_COMPMASK_INDEPSEL;
         }
 
         /* 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);
 
         /* Contact SA Access to retrieve Path Records. */
         access_args.sq_attr_id = SA_MULTIPATHRECORD_ATTRID;

@@ -3847,12 +3811,10 @@
         }
 
         /* "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
          */
         if (p_arg->func) {   /* Do these only for Async Get Paths */

@@ -3861,12 +3823,10 @@
                 if (p_arg->src_ip_p == NULL)
                         p_arg->src_ip_p = kmem_zalloc(
                             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);
 
         hcap = ibcm_find_hca_entry(sl->p_hca_guid);
         if (hcap == NULL) {

@@ -3896,13 +3856,11 @@
                             "SAA HDL NULL, HCA (%llX:%d) NOT ACTIVE",
                             sl[i].p_hca_guid, sl[i].p_port_num);
                         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. */
         retval = ibcm_saa_ip_pr(p_arg, sl, dinfo, &num_path);
 

@@ -3926,13 +3884,11 @@
 
         if (p_arg->func) {   /* Do these only for Async Get Paths */
                 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) {
                         /*
                          * We allocated earlier memory based on "max_paths",
                          * but we got lesser path-records, so re-adjust that

@@ -4132,11 +4088,10 @@
                 IBTF_DPRINTF_L2(cmlog, "ibcm_get_ip_path: "
                     "Unable to allocate memory for local usage.");
                 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) +
             sizeof (ibcm_ip_path_tqargs_t));
         bcopy(attrp->ipa_dst_ip, path_tq->attr.ipa_dst_ip,

@@ -4162,12 +4117,10 @@
         if (func == NULL) {     /* Blocking */
                 mutex_init(&path_tq->ip_lock, NULL, MUTEX_DEFAULT, NULL);
                 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);
         if (ret == 0) {
                 IBTF_DPRINTF_L2(cmlog, "ibcm_get_ip_path: Failed to dispatch "

@@ -4445,12 +4398,10 @@
 
         mpr_req = kmem_zalloc(template_len, KM_SLEEP);
 
         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));
 
         /* SGID */
         if (new_sgid.gid_guid == 0)

@@ -4561,12 +4512,10 @@
 
         mpr_req->Reversible = 1;        /* We always get REVERSIBLE paths. */
         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. */
 
         IBTF_DPRINTF_L3(cmlog, "ibt_get_ip_alt_path: Primary: MTU %d, PKey[%d]="

@@ -4642,16 +4591,12 @@
                         }
                         if (retval != IBT_SUCCESS)
                                 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;
                 }
                 kmem_free(results_p, length);
         }

@@ -4673,35 +4618,6 @@
         ibcm_dec_hca_acc_cnt(hcap);
 
         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);
 }