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

@@ -237,11 +237,10 @@
                 /* Set "status" and "errormsg" and goto failure */
                 TAVOR_TNF_FAIL(IBT_INSUFF_RESOURCE, "failed MR handle");
                 goto mrshared_fail2;
         }
         mr = (tavor_mrhdl_t)rsrc->tr_addr;
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mr))
 
         /*
          * Setup and validate the memory region access flags.  This means
          * translating the IBTF's enable flags into the access flags that
          * will be used in later operations.

@@ -339,11 +338,10 @@
         mr->mr_logmttpgsz = mrhdl->mr_logmttpgsz;
         mr->mr_bindinfo   = mrhdl->mr_bindinfo;
         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;
 
         /*
          * Increment the MTT reference count (to reflect the fact that
          * the MTT is now shared)

@@ -665,12 +663,10 @@
 tavor_mr_query(tavor_state_t *state, tavor_mrhdl_t mr,
     ibt_mr_query_attr_t *attr)
 {
         TAVOR_TNF_ENTER(tavor_mr_query);
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*attr))
-
         mutex_enter(&mr->mr_lock);
 
         /*
          * Check here to see if the memory region has already been partially
          * deregistered as a result of a tavor_umap_umemlock_cb() callback.

@@ -959,11 +955,10 @@
                 /* Set "status" and "errormsg" and goto failure */
                 TAVOR_TNF_FAIL(IBT_INSUFF_RESOURCE, "failed MR handle");
                 goto mwalloc_fail2;
         }
         mw = (tavor_mwhdl_t)rsrc->tr_addr;
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mw))
 
         /*
          * Calculate an "unbound" RKey from MPT index.  In much the same way
          * as we do for memory regions (above), this key is constructed from
          * a "constrained" (which depends on the MPT index) and an

@@ -1068,11 +1063,10 @@
         mutex_enter(&mw->mr_lock);
         mpt     = mw->mr_mptrsrcp;
         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
          * unexpected for this operation to return an error.
          */

@@ -1123,11 +1117,10 @@
          * best effort to ensure that they are).  Third, the window for the
          * race (where both threads read and update the counter at the same
          * time) is incredibly small.
          * And, lastly, we'd like to make this into a "random" key XXX
          */
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(tavor_debug_memkey_cnt))
         log_num_mpt = state->ts_cfg_profile->cp_log_num_mpt;
         tmp = (tavor_debug_memkey_cnt++) << log_num_mpt;
         *key = tmp | indx;
 }
 

@@ -1240,11 +1233,10 @@
                 /* Set "status" and "errormsg" and goto failure */
                 TAVOR_TNF_FAIL(IBT_INSUFF_RESOURCE, "failed MR handle");
                 goto mrcommon_fail2;
         }
         mr = (tavor_mrhdl_t)rsrc->tr_addr;
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mr))
 
         /*
          * Setup and validate the memory region access flags.  This means
          * translating the IBTF's enable flags into the access flags that
          * will be used in later operations.

@@ -1299,13 +1291,10 @@
                         /* Set "status" and "errormsg" and goto failure */
                         TAVOR_TNF_FAIL(IBT_INSUFF_RESOURCE, "failed umem pin");
                         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) {
                         /* Set "status" and "errormsg" and goto failure */
                         TAVOR_TNF_FAIL(IBT_INSUFF_RESOURCE, "failed iosetup");

@@ -1312,13 +1301,10 @@
                         goto mrcommon_fail3;
                 }
                 bind->bi_type = TAVOR_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 = tavor_umap_db_alloc(state->ts_instance,
                     (uint64_t)(uintptr_t)umem_cookie, MLNX_UMAP_MRMEM_RSRC,
                     (uint64_t)(uintptr_t)rsrc);
                 if (umapdb == NULL) {
                         /* Set "status" and "errormsg" and goto failure */

@@ -1329,11 +1315,10 @@
 
         /*
          * Setup the bindinfo for the mtt bind call
          */
         bh = &mr->mr_bindinfo;
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bh))
         bcopy(bind, bh, sizeof (tavor_bind_info_t));
         bh->bi_bypass = bind_type;
         status = tavor_mr_mtt_bind(state, bh, bind_dmahdl, &mtt,
             &mtt_pgsize_bits);
         if (status != DDI_SUCCESS) {

@@ -1362,11 +1347,10 @@
                 TAVOR_TNF_FAIL(IBT_INSUFF_RESOURCE, "failed refence count");
                 goto mrcommon_fail6;
         }
         mr->mr_mttrefcntp = mtt_refcnt;
         swrc_tmp = (tavor_sw_refcnt_t *)mtt_refcnt->tr_addr;
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*swrc_tmp))
         TAVOR_MTT_REFCNT_INIT(swrc_tmp);
 
         /*
          * Fill in the MPT entry.  This is the final step before passing
          * ownership of the MPT entry to the Tavor hardware.  We use all of

@@ -1465,13 +1449,11 @@
                  * Free up the memory ddi_umem_iosetup() allocates
                  * internally.
                  */
                 if (bind->bi_type == TAVOR_BINDHDL_UBUF) {
                         freerbuf(bind->bi_buf);
-                        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bind))
                         bind->bi_type = TAVOR_BINDHDL_NONE;
-                        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*bind))
                 }
                 ddi_umem_unlock(umem_cookie);
         }
 mrcommon_fail3:
         tavor_rsrc_free(state, &rsrc);

@@ -1538,11 +1520,10 @@
         if (status != DDI_SUCCESS) {
                 status = IBT_INSUFF_RESOURCE;
                 goto mrcommon_fail2;
         }
         mr = (tavor_mrhdl_t)rsrc->tr_addr;
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mr))
         bzero(mr, sizeof (*mr));
 
         /*
          * Setup and validate the memory region access flags.  This means
          * translating the IBTF's enable flags into the access flags that

@@ -1800,12 +1781,10 @@
         int                     status;
         char                    *errormsg;
 
         TAVOR_TNF_ENTER(tavor_mr_common_rereg);
 
-        _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
          * currently supported.  Return failure. XXX
          */

@@ -2409,11 +2388,10 @@
                                 TAVOR_TNF_FAIL(IBT_INSUFF_RESOURCE,
                                     "failed reference count");
                                 goto mrrereghelp_fail;
                         }
                         swrc_new = (tavor_sw_refcnt_t *)mtt_refcnt->tr_addr;
-                        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*swrc_new))
                         TAVOR_MTT_REFCNT_INIT(swrc_new);
                 } else {
                         mtt_refcnt = mr->mr_mttrefcntp;
                 }
 

@@ -2535,12 +2513,10 @@
             bind->bi_type == TAVOR_BINDHDL_BUF ||
             bind->bi_type == TAVOR_BINDHDL_UBUF);
 
         TAVOR_TNF_ENTER(tavor_mr_mem_bind);
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bind))
-
         /* Set the callback flag appropriately */
         callback = (sleep == TAVOR_SLEEP) ? DDI_DMA_SLEEP : DDI_DMA_DONTWAIT;
 
         /* Determine whether to map STREAMING or CONSISTENT */
         dma_xfer_mode = (bind->bi_flags & IBT_MR_NONCOHERENT) ?

@@ -2635,16 +2611,14 @@
          * In case of TAVOR_BINDHDL_UBUF, the memory bi_buf points to
          * is actually allocated by ddi_umem_iosetup() internally, then
          * it's required to free it here. Reset bi_type to TAVOR_BINDHDL_NONE
          * not to free it again later.
          */
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bind))
         if (bind->bi_type == TAVOR_BINDHDL_UBUF) {
                 freerbuf(bind->bi_buf);
                 bind->bi_type = TAVOR_BINDHDL_NONE;
         }
-        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*bind))
 
         /*
          * Unbind the DMA memory for the region
          *
          * Note: The only way ddi_dma_unbind_handle() currently

@@ -2713,12 +2687,10 @@
                         addr += pagesize;
                         i++;
 
                         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 "
                                             "dma_cookie address from caller\n");
                                 }