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

*** 2359,2369 **** TAVOR_TNF_ERROR, ""); TAVOR_TNF_EXIT(tavor_wrid_from_reset_handling); return (ibc_get_ci_failure(0)); } } - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*swq)) qp->qp_sq_wqhdr = swq; swq->wq_size = qp->qp_sq_bufsz; swq->wq_head = 0; swq->wq_tail = 0; swq->wq_full = 0; --- 2359,2368 ----
*** 2387,2413 **** TNF_PROBE_0(tavor_wrid_from_reset_handling_wridlist_fail, TAVOR_TNF_ERROR, ""); TAVOR_TNF_EXIT(tavor_wrid_from_reset_handling); return (ibc_get_ci_failure(0)); } - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*s_wridlist)) s_wridlist->wl_wqhdr = swq; /* Chain the new WRID list container to the workq hdr list */ mutex_enter(&swq->wq_wrid_wql->wql_lock); tavor_wrid_wqhdr_add(swq, s_wridlist); mutex_exit(&swq->wq_wrid_wql->wql_lock); qp_srq_en = qp->qp_srq_en; - #ifdef __lock_lint - mutex_enter(&qp->qp_srqhdl->srq_lock); - #else if (qp_srq_en == TAVOR_QP_SRQ_ENABLED) { mutex_enter(&qp->qp_srqhdl->srq_lock); } ! #endif /* * Now we repeat all the above operations for the receive work queue, * or shared receive work queue. * * Note: We still use the 'qp_rq_cqhdl' even in the SRQ case. --- 2386,2408 ---- TNF_PROBE_0(tavor_wrid_from_reset_handling_wridlist_fail, TAVOR_TNF_ERROR, ""); TAVOR_TNF_EXIT(tavor_wrid_from_reset_handling); return (ibc_get_ci_failure(0)); } s_wridlist->wl_wqhdr = swq; /* Chain the new WRID list container to the workq hdr list */ mutex_enter(&swq->wq_wrid_wql->wql_lock); tavor_wrid_wqhdr_add(swq, s_wridlist); mutex_exit(&swq->wq_wrid_wql->wql_lock); qp_srq_en = qp->qp_srq_en; if (qp_srq_en == TAVOR_QP_SRQ_ENABLED) { mutex_enter(&qp->qp_srqhdl->srq_lock); } ! /* * Now we repeat all the above operations for the receive work queue, * or shared receive work queue. * * Note: We still use the 'qp_rq_cqhdl' even in the SRQ case.
*** 2445,2470 **** if (create_new_swq) { tavor_cq_wqhdr_remove(qp->qp_sq_cqhdl, swq); } - #ifdef __lock_lint - mutex_exit(&qp->qp_srqhdl->srq_lock); - #else if (qp_srq_en == TAVOR_QP_SRQ_ENABLED) { mutex_exit(&qp->qp_srqhdl->srq_lock); } - #endif tavor_wrid_wqhdr_unlock_both(qp); TNF_PROBE_0(tavor_wrid_from_reset_handling_wqhdr_fail, TAVOR_TNF_ERROR, ""); TAVOR_TNF_EXIT(tavor_wrid_from_reset_handling); return (ibc_get_ci_failure(0)); } } - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*rwq)) /* * Setup receive workq hdr * * If the QP is on an SRQ, we setup the SRQ specific fields, setting --- 2440,2460 ----
*** 2529,2553 **** } if (create_new_rwq) { tavor_cq_wqhdr_remove(qp->qp_rq_cqhdl, rwq); } - #ifdef __lock_lint - mutex_exit(&qp->qp_srqhdl->srq_lock); - #else if (qp_srq_en == TAVOR_QP_SRQ_ENABLED) { mutex_exit(&qp->qp_srqhdl->srq_lock); } - #endif tavor_wrid_wqhdr_unlock_both(qp); TNF_PROBE_0(tavor_wrid_from_reset_handling_wridlist_fail, TAVOR_TNF_ERROR, ""); TAVOR_TNF_EXIT(tavor_wrid_from_reset_handling); return (ibc_get_ci_failure(0)); } - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*r_wridlist)) /* * Initialize the wridlist * * In the normal QP case, there is no special initialization needed. --- 2519,2538 ----
*** 2584,2606 **** /* Chain the WRID list "container" to the workq hdr list */ mutex_enter(&rwq->wq_wrid_wql->wql_lock); tavor_wrid_wqhdr_add(rwq, r_wridlist); mutex_exit(&rwq->wq_wrid_wql->wql_lock); - #ifdef __lock_lint - mutex_exit(&qp->qp_srqhdl->srq_lock); - #else if (qp_srq_en == TAVOR_QP_SRQ_ENABLED) { mutex_exit(&qp->qp_srqhdl->srq_lock); } - #endif - _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*r_wridlist)) - _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*rwq)) - _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*s_wridlist)) - _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*swq)) - tavor_wrid_wqhdr_unlock_both(qp); TAVOR_TNF_EXIT(tavor_wrid_from_reset_handling); return (DDI_SUCCESS); } --- 2569,2582 ----
*** 3121,3136 **** * things can be added or removed from the list at this point would be * through post a work request to a QP. But if we've come this far, * then we can be assured that there are no longer any QP associated * with the CQ that we are trying to free. */ - #ifdef __lock_lint - tavor_wrid_wqhdr_compare(NULL, NULL); - #endif treep = &cq->cq_wrid_wqhdr_avl_tree; while ((curr = avl_destroy_nodes(treep, &cookie)) != NULL) { - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*curr)) container = curr->wq_wrid_poll; while (container != NULL) { to_free = container; container = container->wl_next; /* --- 3097,3108 ----
*** 3183,3193 **** */ wridlist = (tavor_wrid_list_hdr_t *)kmem_zalloc(size, KM_NOSLEEP); if (wridlist == NULL) { return (NULL); } - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*wridlist)) /* Complete the "container" initialization */ wridlist->wl_size = qsize; wridlist->wl_full = 0; wridlist->wl_head = 0; --- 3155,3164 ----
*** 3325,3337 **** * create a new entry because it helps us easily find the end of the * list. */ cmp.cmp_qpn = qpn; cmp.cmp_type = wq_type; - #ifdef __lock_lint - tavor_wrid_wqhdr_compare(NULL, NULL); - #endif curr = avl_find(&cq->cq_wrid_wqhdr_avl_tree, &cmp, NULL); TAVOR_TNF_EXIT(tavor_wrid_wqhdr_find); return (curr); } --- 3296,3305 ----
*** 3362,3372 **** sizeof (tavor_workq_hdr_t), KM_NOSLEEP); if (wqhdr_tmp == NULL) { TAVOR_TNF_EXIT(tavor_wrid_wqhdr_create); return (NULL); } - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*wqhdr_tmp)) wqhdr_tmp->wq_qpn = qpn; wqhdr_tmp->wq_type = wq_type; if (create_wql) { wqhdr_tmp->wq_wrid_wql = tavor_wrid_wql_create(state); --- 3330,3339 ----
*** 3585,3612 **** tavor_cqhdl_t sq_cq, rq_cq; sq_cq = qp->qp_sq_cqhdl; rq_cq = qp->qp_rq_cqhdl; - _NOTE(MUTEX_ACQUIRED_AS_SIDE_EFFECT(&sq_cq->cq_wrid_wqhdr_lock)) - _NOTE(MUTEX_ACQUIRED_AS_SIDE_EFFECT(&rq_cq->cq_wrid_wqhdr_lock)) - /* * If both work queues (send and recv) share a completion queue, then * grab the common lock. If they use different CQs (hence different * "cq_wrid_wqhdr_list" locks), then grab the send one first, then the * receive. We do this consistently and correctly in * tavor_wrid_wqhdr_unlock_both() below to avoid introducing any kind ! * of dead lock condition. Note: We add the "__lock_lint" code here ! * to fake out warlock into thinking we've grabbed both locks (when, ! * in fact, we only needed the one). */ if (sq_cq == rq_cq) { mutex_enter(&sq_cq->cq_wrid_wqhdr_lock); - #ifdef __lock_lint - mutex_enter(&rq_cq->cq_wrid_wqhdr_lock); - #endif } else { mutex_enter(&sq_cq->cq_wrid_wqhdr_lock); mutex_enter(&rq_cq->cq_wrid_wqhdr_lock); } } --- 3552,3571 ---- tavor_cqhdl_t sq_cq, rq_cq; sq_cq = qp->qp_sq_cqhdl; rq_cq = qp->qp_rq_cqhdl; /* * If both work queues (send and recv) share a completion queue, then * grab the common lock. If they use different CQs (hence different * "cq_wrid_wqhdr_list" locks), then grab the send one first, then the * receive. We do this consistently and correctly in * tavor_wrid_wqhdr_unlock_both() below to avoid introducing any kind ! * of dead lock condition. */ if (sq_cq == rq_cq) { mutex_enter(&sq_cq->cq_wrid_wqhdr_lock); } else { mutex_enter(&sq_cq->cq_wrid_wqhdr_lock); mutex_enter(&rq_cq->cq_wrid_wqhdr_lock); } }
*** 3621,3640 **** tavor_cqhdl_t sq_cq, rq_cq; sq_cq = qp->qp_sq_cqhdl; rq_cq = qp->qp_rq_cqhdl; - _NOTE(LOCK_RELEASED_AS_SIDE_EFFECT(&rq_cq->cq_wrid_wqhdr_lock)) - _NOTE(LOCK_RELEASED_AS_SIDE_EFFECT(&sq_cq->cq_wrid_wqhdr_lock)) - /* * See tavor_wrid_wqhdr_lock_both() above for more detail */ if (sq_cq == rq_cq) { - #ifdef __lock_lint - mutex_exit(&rq_cq->cq_wrid_wqhdr_lock); - #endif mutex_exit(&sq_cq->cq_wrid_wqhdr_lock); } else { mutex_exit(&rq_cq->cq_wrid_wqhdr_lock); mutex_exit(&sq_cq->cq_wrid_wqhdr_lock); } --- 3580,3593 ----
*** 3653,3665 **** ASSERT(MUTEX_HELD(&cq->cq_wrid_wqhdr_lock)); cmp.cmp_qpn = wqhdr->wq_qpn; cmp.cmp_type = wqhdr->wq_type; - #ifdef __lock_lint - tavor_wrid_wqhdr_compare(NULL, NULL); - #endif (void) avl_find(&cq->cq_wrid_wqhdr_avl_tree, &cmp, &where); /* * If the CQ's work queue list is empty, then just add it. * Otherwise, chain it to the beginning of the list. */ --- 3606,3615 ----
*** 3674,3686 **** static void tavor_cq_wqhdr_remove(tavor_cqhdl_t cq, tavor_workq_hdr_t *wqhdr) { ASSERT(MUTEX_HELD(&cq->cq_wrid_wqhdr_lock)); - #ifdef __lock_lint - tavor_wrid_wqhdr_compare(NULL, NULL); - #endif /* Remove "wqhdr" from the work queue header list on "cq" */ avl_remove(&cq->cq_wrid_wqhdr_avl_tree, wqhdr); /* * Release reference to WQL; If this is the last reference, this call --- 3624,3633 ----