Print this page
8368 remove warlock leftovers from usr/src/uts
*** 237,247 ****
/* 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.
--- 237,246 ----
*** 339,349 ****
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)
--- 338,347 ----
*** 665,676 ****
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.
--- 663,672 ----
*** 959,969 ****
/* 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
--- 955,964 ----
*** 1068,1078 ****
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.
*/
--- 1063,1072 ----
*** 1123,1133 ****
* 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;
}
--- 1117,1126 ----
*** 1240,1250 ****
/* 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.
--- 1233,1242 ----
*** 1299,1311 ****
/* 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");
--- 1291,1300 ----
*** 1312,1324 ****
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 */
--- 1301,1310 ----
*** 1329,1339 ****
/*
* 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) {
--- 1315,1324 ----
*** 1362,1372 ****
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
--- 1347,1356 ----
*** 1465,1477 ****
* 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);
--- 1449,1459 ----
*** 1538,1548 ****
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
--- 1520,1529 ----
*** 1800,1811 ****
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
*/
--- 1781,1790 ----
*** 2409,2419 ****
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;
}
--- 2388,2397 ----
*** 2535,2546 ****
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) ?
--- 2513,2522 ----
*** 2635,2650 ****
* 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
--- 2611,2624 ----
*** 2713,2724 ****
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");
}
--- 2687,2696 ----