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

@@ -225,11 +225,10 @@
         if (status != DDI_SUCCESS) {
                 status = IBT_INSUFF_RESOURCE;
                 goto mrshared_fail2;
         }
         mr = (hermon_mrhdl_t)rsrc->hr_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.

@@ -318,11 +317,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)

@@ -495,11 +493,10 @@
         if (status != DDI_SUCCESS) {
                 status = IBT_INSUFF_RESOURCE;
                 goto fmralloc_fail2;
         }
         mr = (hermon_mrhdl_t)rsrc->hr_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.

@@ -622,11 +619,10 @@
         /* initialize hr_addr for use during register/deregister/invalidate */
         icm_table = &state->hs_icm[HERMON_DMPT];
         rindx = mpt->hr_indx;
         hermon_index(index1, index2, rindx, icm_table, i);
         dma_info = icm_table->icm_dma[index1] + index2;
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mpt))
         mpt->hr_addr = (void *)((uintptr_t)(dma_info->vaddr + i * mpt->hr_len));
 
         *mrhdl = mr;
 
         return (DDI_SUCCESS);

@@ -989,12 +985,10 @@
 {
         int                     status;
         hermon_hw_dmpt_t        mpt_entry;
         uint32_t                lkey;
 
-        _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 hermon_umap_umemlock_cb() callback.

@@ -1275,11 +1269,10 @@
         if (status != DDI_SUCCESS) {
                 status = IBT_INSUFF_RESOURCE;
                 goto mwalloc_fail2;
         }
         mw = (hermon_mwhdl_t)rsrc->hr_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

@@ -1374,11 +1367,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.
          */

@@ -1431,11 +1423,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
          */
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(hermon_memkey_cnt))
         tmp_key = (hermon_memkey_cnt++) << HERMON_MEMKEY_SHIFT;
         tmp_indx = indx & 0xffffff;
         return (tmp_key | tmp_indx);
 }
 

@@ -1560,11 +1551,10 @@
         if (status != DDI_SUCCESS) {
                 status = IBT_INSUFF_RESOURCE;
                 goto mrcommon_fail2;
         }
         mr = (hermon_mrhdl_t)rsrc->hr_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.

@@ -1614,25 +1604,19 @@
                 if (status != 0) {
                         status = IBT_INSUFF_RESOURCE;
                         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) {
                         status = IBT_INSUFF_RESOURCE;
                         goto mrcommon_fail3;
                 }
                 bind->bi_type = HERMON_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 = hermon_umap_db_alloc(state->hs_instance,
                     (uint64_t)(uintptr_t)umem_cookie, MLNX_UMAP_MRMEM_RSRC,
                     (uint64_t)(uintptr_t)rsrc);
                 if (umapdb == NULL) {
                         status = IBT_INSUFF_RESOURCE;

@@ -1642,11 +1626,10 @@
 
         /*
          * Setup the bindinfo for the mtt bind call
          */
         bh = &mr->mr_bindinfo;
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bh))
         bcopy(bind, bh, sizeof (hermon_bind_info_t));
         bh->bi_bypass = bind_type;
         status = hermon_mr_mtt_bind(state, bh, bind_dmahdl, &mtt,
             &mtt_pgsize_bits, mpt != NULL);
         if (status != DDI_SUCCESS) {

@@ -1672,11 +1655,10 @@
                 status = IBT_INSUFF_RESOURCE;
                 goto mrcommon_fail6;
         }
         mr->mr_mttrefcntp = mtt_refcnt;
         swrc_tmp = (hermon_sw_refcnt_t *)mtt_refcnt->hr_addr;
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*swrc_tmp))
         HERMON_MTT_REFCNT_INIT(swrc_tmp);
 
         mtt_addr = (mtt->hr_indx << HERMON_MTT_SIZE_SHIFT);
 
         /*

@@ -1803,13 +1785,11 @@
                  * Free up the memory ddi_umem_iosetup() allocates
                  * internally.
                  */
                 if (bind->bi_type == HERMON_BINDHDL_UBUF) {
                         freerbuf(bind->bi_buf);
-                        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bind))
                         bind->bi_type = HERMON_BINDHDL_NONE;
-                        _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*bind))
                 }
                 ddi_umem_unlock(umem_cookie);
         }
 mrcommon_fail3:
         hermon_rsrc_free(state, &rsrc);

@@ -1878,11 +1858,10 @@
         if (status != DDI_SUCCESS) {
                 status = IBT_INSUFF_RESOURCE;
                 goto mrcommon_fail2;
         }
         mr = (hermon_mrhdl_t)rsrc->hr_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

@@ -2057,11 +2036,10 @@
         if (status != DDI_SUCCESS) {
                 status = IBT_INSUFF_RESOURCE;
                 goto alloclkey_fail2;
         }
         mr = (hermon_mrhdl_t)rsrc->hr_addr;
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*mr))
         bzero(mr, sizeof (*mr));
         mr->mr_bindinfo.bi_type = HERMON_BINDHDL_LKEY;
 
         mr->mr_lkey = hermon_mr_keycalc(mpt->hr_indx);
 

@@ -2085,11 +2063,10 @@
                 status = IBT_INSUFF_RESOURCE;
                 goto alloclkey_fail4;
         }
         mr->mr_mttrefcntp = mtt_refcnt;
         swrc_tmp = (hermon_sw_refcnt_t *)mtt_refcnt->hr_addr;
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*swrc_tmp))
         HERMON_MTT_REFCNT_INIT(swrc_tmp);
 
         mtt_addr = (mtt->hr_indx << HERMON_MTT_SIZE_SHIFT);
 
         bzero(&mpt_entry, sizeof (hermon_hw_dmpt_t));

@@ -2386,12 +2363,10 @@
         hermon_hw_dmpt_t        mpt_entry;
         uint64_t                mtt_addr_to_use, vaddr_to_use, len_to_use;
         uint_t                  sleep, dereg_level;
         int                     status;
 
-        _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.
          */

@@ -2987,11 +2962,10 @@
 
                                 status = IBT_INSUFF_RESOURCE;
                                 goto mrrereghelp_fail;
                         }
                         swrc_new = (hermon_sw_refcnt_t *)mtt_refcnt->hr_addr;
-                        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*swrc_new))
                         HERMON_MTT_REFCNT_INIT(swrc_new);
                 } else {
                         mtt_refcnt = mr->mr_mttrefcntp;
                 }
 

@@ -3103,12 +3077,10 @@
         /* bi_type must be set to a meaningful value to get a bind handle */
         ASSERT(bind->bi_type == HERMON_BINDHDL_VADDR ||
             bind->bi_type == HERMON_BINDHDL_BUF ||
             bind->bi_type == HERMON_BINDHDL_UBUF);
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bind))
-
         /* Set the callback flag appropriately */
         callback = (sleep == HERMON_SLEEP) ? DDI_DMA_SLEEP : DDI_DMA_DONTWAIT;
 
         /*
          * Initialize many of the default DMA attributes.  Then, if we're

@@ -3190,11 +3162,10 @@
 static void
 hermon_mr_mem_unbind(hermon_state_t *state, hermon_bind_info_t *bind)
 {
         int     status;
 
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bind))
         /* there is nothing to unbind for alloc_lkey */
         if (bind->bi_type == HERMON_BINDHDL_LKEY)
                 return;
 
         /*

@@ -3201,16 +3172,14 @@
          * In case of HERMON_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 HERMON_BINDHDL_NONE
          * not to free it again later.
          */
-        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*bind))
         if (bind->bi_type == HERMON_BINDHDL_UBUF) {
                 freerbuf(bind->bi_buf);
                 bind->bi_type = HERMON_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

@@ -3321,12 +3290,10 @@
                         }
 
                         addr += pagesize;
                         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");
                                 }