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

*** 225,235 **** 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. --- 225,234 ----
*** 318,328 **** 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) --- 317,326 ----
*** 495,505 **** 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. --- 493,502 ----
*** 622,632 **** /* 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); --- 619,628 ----
*** 989,1000 **** { 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. --- 985,994 ----
*** 1275,1285 **** 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 --- 1269,1278 ----
*** 1374,1384 **** 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. */ --- 1367,1376 ----
*** 1431,1441 **** * 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); } --- 1423,1432 ----
*** 1560,1570 **** 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. --- 1551,1560 ----
*** 1614,1638 **** 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; --- 1604,1622 ----
*** 1642,1652 **** /* * 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) { --- 1626,1635 ----
*** 1672,1682 **** 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); /* --- 1655,1664 ----
*** 1803,1815 **** * 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); --- 1785,1795 ----
*** 1878,1888 **** 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 --- 1858,1867 ----
*** 2057,2067 **** 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); --- 2036,2045 ----
*** 2085,2095 **** 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)); --- 2063,2072 ----
*** 2386,2397 **** 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. */ --- 2363,2372 ----
*** 2987,2997 **** 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; } --- 2962,2971 ----
*** 3103,3114 **** /* 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 --- 3077,3086 ----
*** 3190,3200 **** 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; /* --- 3162,3171 ----
*** 3201,3216 **** * 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 --- 3172,3185 ----
*** 3321,3332 **** } 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"); } --- 3290,3299 ----