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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/ib/adapters/hermon/hermon_wr.c
          +++ new/usr/src/uts/common/io/ib/adapters/hermon/hermon_wr.c
↓ open down ↓ 91 lines elided ↑ open up ↑
  92   92          uint32_t                        *wqe_start;
  93   93          int                             sectperwqe;
  94   94          uint_t                          posted_cnt = 0;
  95   95          int                             total_len, strong_order, fc_bits, cksum;
  96   96  
  97   97  
  98   98          /* initialize the FMA retry loop */
  99   99          hermon_pio_init(fm_loop_cnt, fm_status, fm_test_num);
 100  100  
 101  101          ASSERT(MUTEX_HELD(&qp->qp_sq_lock));
 102      -        _NOTE(LOCK_RELEASED_AS_SIDE_EFFECT(&qp->qp_sq_lock))
 103  102  
 104  103          /* Grab the lock for the WRID list */
 105  104          membar_consumer();
 106  105  
 107  106          /* Save away some initial QP state */
 108  107          wq = qp->qp_sq_wqhdr;
 109  108          qsize_msk = wq->wq_mask;
 110  109          hdrmwqes  = qp->qp_sq_hdrmwqes;         /* in WQEs  */
 111  110          sectperwqe = 1 << (qp->qp_sq_log_wqesz - 2);
 112  111  
↓ open down ↓ 336 lines elided ↑ open up ↑
 449  448          int                             strong_order;
 450  449          int                             print_rdma;
 451  450          int                             rlen;
 452  451          uint32_t                        rkey;
 453  452          uint64_t                        raddr;
 454  453  
 455  454          /* initialize the FMA retry loop */
 456  455          hermon_pio_init(fm_loop_cnt, fm_status, fm_test_num);
 457  456  
 458  457          ASSERT(MUTEX_HELD(&qp->qp_sq_lock));
 459      -        _NOTE(LOCK_RELEASED_AS_SIDE_EFFECT(&qp->qp_sq_lock))
 460  458  
 461  459          /* Save away some initial QP state */
 462  460          wq = qp->qp_sq_wqhdr;
 463  461          qsize_msk = wq->wq_mask;
 464  462          hdrmwqes  = qp->qp_sq_hdrmwqes;         /* in WQEs  */
 465  463          sectperwqe = 1 << (qp->qp_sq_log_wqesz - 2);
 466  464  
 467  465          tail      = wq->wq_tail;
 468  466          head      = wq->wq_head;
 469  467          status    = DDI_SUCCESS;
↓ open down ↓ 1743 lines elided ↑ open up ↑
2213 2211   */
2214 2212  /* ARGSUSED */
2215 2213  int
2216 2214  hermon_wrid_from_reset_handling(hermon_state_t *state, hermon_qphdl_t qp)
2217 2215  {
2218 2216          hermon_workq_hdr_t      *swq, *rwq;
2219 2217  
2220 2218          if (qp->qp_alloc_flags & IBT_QP_USER_MAP)
2221 2219                  return (DDI_SUCCESS);
2222 2220  
2223      -#ifdef __lock_lint
2224      -        mutex_enter(&qp->qp_rq_cqhdl->cq_lock);
2225      -        mutex_enter(&qp->qp_sq_cqhdl->cq_lock);
2226      -#else
2227 2221          /* grab the cq lock(s) to modify the wqavl tree */
2228 2222          if (qp->qp_rq_cqhdl)
2229 2223                  mutex_enter(&qp->qp_rq_cqhdl->cq_lock);
2230 2224          if (qp->qp_rq_cqhdl != qp->qp_sq_cqhdl &&
2231 2225              qp->qp_sq_cqhdl != NULL)
2232 2226                  mutex_enter(&qp->qp_sq_cqhdl->cq_lock);
2233      -#endif
2234 2227  
2235 2228          /* Chain the newly allocated work queue header to the CQ's list */
2236 2229          if (qp->qp_sq_cqhdl)
2237 2230                  hermon_cq_workq_add(qp->qp_sq_cqhdl, &qp->qp_sq_wqavl);
2238 2231  
2239 2232          swq = qp->qp_sq_wqhdr;
2240 2233          swq->wq_head = 0;
2241 2234          swq->wq_tail = 0;
2242 2235          swq->wq_full = 0;
2243 2236  
2244 2237          /*
2245 2238           * Now we repeat all the above operations for the receive work queue,
2246 2239           * or shared receive work queue.
2247 2240           *
2248 2241           * Note: We still use the 'qp_rq_cqhdl' even in the SRQ case.
2249 2242           */
2250 2243  
2251      -#ifdef __lock_lint
2252      -        mutex_enter(&qp->qp_srqhdl->srq_lock);
2253      -#else
2254 2244          if (qp->qp_alloc_flags & IBT_QP_USES_SRQ) {
2255 2245                  mutex_enter(&qp->qp_srqhdl->srq_lock);
2256 2246          } else {
2257 2247                  rwq = qp->qp_rq_wqhdr;
2258 2248                  rwq->wq_head = 0;
2259 2249                  rwq->wq_tail = 0;
2260 2250                  rwq->wq_full = 0;
2261 2251                  qp->qp_rq_wqecntr = 0;
2262 2252          }
2263      -#endif
2264 2253          hermon_cq_workq_add(qp->qp_rq_cqhdl, &qp->qp_rq_wqavl);
2265 2254  
2266      -#ifdef __lock_lint
2267      -        mutex_exit(&qp->qp_srqhdl->srq_lock);
2268      -#else
2269 2255          if (qp->qp_alloc_flags & IBT_QP_USES_SRQ) {
2270 2256                  mutex_exit(&qp->qp_srqhdl->srq_lock);
2271 2257          }
2272      -#endif
2273 2258  
2274      -#ifdef __lock_lint
2275      -        mutex_exit(&qp->qp_sq_cqhdl->cq_lock);
2276      -        mutex_exit(&qp->qp_rq_cqhdl->cq_lock);
2277      -#else
2278 2259          if (qp->qp_rq_cqhdl != qp->qp_sq_cqhdl &&
2279 2260              qp->qp_sq_cqhdl != NULL)
2280 2261                  mutex_exit(&qp->qp_sq_cqhdl->cq_lock);
2281 2262          if (qp->qp_rq_cqhdl)
2282 2263                  mutex_exit(&qp->qp_rq_cqhdl->cq_lock);
2283      -#endif
2284 2264          return (DDI_SUCCESS);
2285 2265  }
2286 2266  
2287 2267  
2288 2268  /*
2289 2269   * hermon_wrid_to_reset_handling()
2290 2270   *    Context: Can be called from interrupt or base context.
2291 2271   */
2292 2272  int
2293 2273  hermon_wrid_to_reset_handling(hermon_state_t *state, hermon_qphdl_t qp)
2294 2274  {
2295 2275          if (qp->qp_alloc_flags & IBT_QP_USER_MAP)
2296 2276                  return (DDI_SUCCESS);
2297 2277  
2298 2278          /*
2299 2279           * If there are unpolled entries in these CQs, they are
2300 2280           * polled/flushed.
2301 2281           * Grab the CQ lock(s) before manipulating the lists.
2302 2282           */
2303      -#ifdef __lock_lint
2304      -        mutex_enter(&qp->qp_rq_cqhdl->cq_lock);
2305      -        mutex_enter(&qp->qp_sq_cqhdl->cq_lock);
2306      -#else
2307 2283          /* grab the cq lock(s) to modify the wqavl tree */
2308 2284          if (qp->qp_rq_cqhdl)
2309 2285                  mutex_enter(&qp->qp_rq_cqhdl->cq_lock);
2310 2286          if (qp->qp_rq_cqhdl != qp->qp_sq_cqhdl &&
2311 2287              qp->qp_sq_cqhdl != NULL)
2312 2288                  mutex_enter(&qp->qp_sq_cqhdl->cq_lock);
2313      -#endif
2314 2289  
2315      -#ifdef __lock_lint
2316      -        mutex_enter(&qp->qp_srqhdl->srq_lock);
2317      -#else
2318 2290          if (qp->qp_alloc_flags & IBT_QP_USES_SRQ) {
2319 2291                  mutex_enter(&qp->qp_srqhdl->srq_lock);
2320 2292          }
2321      -#endif
2322 2293          /*
2323 2294           * Flush the entries on the CQ for this QP's QPN.
2324 2295           */
2325 2296          hermon_cq_entries_flush(state, qp);
2326 2297  
2327      -#ifdef __lock_lint
2328      -        mutex_exit(&qp->qp_srqhdl->srq_lock);
2329      -#else
2330 2298          if (qp->qp_alloc_flags & IBT_QP_USES_SRQ) {
2331 2299                  mutex_exit(&qp->qp_srqhdl->srq_lock);
2332 2300          }
2333      -#endif
2334 2301  
2335 2302          hermon_cq_workq_remove(qp->qp_rq_cqhdl, &qp->qp_rq_wqavl);
2336 2303          if (qp->qp_sq_cqhdl != NULL)
2337 2304                  hermon_cq_workq_remove(qp->qp_sq_cqhdl, &qp->qp_sq_wqavl);
2338 2305  
2339      -#ifdef __lock_lint
2340      -        mutex_exit(&qp->qp_sq_cqhdl->cq_lock);
2341      -        mutex_exit(&qp->qp_rq_cqhdl->cq_lock);
2342      -#else
2343 2306          if (qp->qp_rq_cqhdl != qp->qp_sq_cqhdl &&
2344 2307              qp->qp_sq_cqhdl != NULL)
2345 2308                  mutex_exit(&qp->qp_sq_cqhdl->cq_lock);
2346 2309          if (qp->qp_rq_cqhdl)
2347 2310                  mutex_exit(&qp->qp_rq_cqhdl->cq_lock);
2348      -#endif
2349 2311  
2350 2312          return (IBT_SUCCESS);
2351 2313  }
2352 2314  
2353 2315  
2354 2316  /*
2355 2317   * hermon_wrid_get_entry()
2356 2318   *    Context: Can be called from interrupt or base context.
2357 2319   */
2358 2320  uint64_t
↓ open down ↓ 80 lines elided ↑ open up ↑
2439 2401          hermon_workq_compare_t  cmp;
2440 2402  
2441 2403          /*
2442 2404           * Walk the CQ's work queue list, trying to find a send or recv queue
2443 2405           * with the same QP number.  We do this even if we are going to later
2444 2406           * create a new entry because it helps us easily find the end of the
2445 2407           * list.
2446 2408           */
2447 2409          cmp.cmp_qpn = qpn;
2448 2410          cmp.cmp_type = wq_type;
2449      -#ifdef __lock_lint
2450      -        hermon_wrid_workq_compare(NULL, NULL);
2451      -#endif
2452 2411          curr = avl_find(&cq->cq_wrid_wqhdr_avl_tree, &cmp, NULL);
2453 2412  
2454 2413          return (curr);
2455 2414  }
2456 2415  
2457 2416  
2458 2417  /*
2459 2418   * hermon_wrid_wqhdr_create()
2460 2419   *    Context: Can be called from base context.
2461 2420   */
↓ open down ↓ 3 lines elided ↑ open up ↑
2465 2424  {
2466 2425          hermon_workq_hdr_t      *wqhdr;
2467 2426  
2468 2427          /*
2469 2428           * Allocate space for the wqhdr, and an array to record all the wrids.
2470 2429           */
2471 2430          wqhdr = (hermon_workq_hdr_t *)kmem_zalloc(sizeof (*wqhdr), KM_NOSLEEP);
2472 2431          if (wqhdr == NULL) {
2473 2432                  return (NULL);
2474 2433          }
2475      -        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*wqhdr))
2476 2434          wqhdr->wq_wrid = kmem_zalloc(bufsz * sizeof (uint64_t), KM_NOSLEEP);
2477 2435          if (wqhdr->wq_wrid == NULL) {
2478 2436                  kmem_free(wqhdr, sizeof (*wqhdr));
2479 2437                  return (NULL);
2480 2438          }
2481 2439          wqhdr->wq_size = bufsz;
2482 2440          wqhdr->wq_mask = bufsz - 1;
2483 2441  
2484 2442          return (wqhdr);
2485 2443  }
↓ open down ↓ 11 lines elided ↑ open up ↑
2497 2455   *    Context: Can be called from interrupt or base context.
2498 2456   */
2499 2457  static void
2500 2458  hermon_cq_workq_add(hermon_cqhdl_t cq, hermon_workq_avl_t *wqavl)
2501 2459  {
2502 2460          hermon_workq_compare_t  cmp;
2503 2461          avl_index_t             where;
2504 2462  
2505 2463          cmp.cmp_qpn = wqavl->wqa_qpn;
2506 2464          cmp.cmp_type = wqavl->wqa_type;
2507      -#ifdef __lock_lint
2508      -        hermon_wrid_workq_compare(NULL, NULL);
2509      -#endif
2510 2465          (void) avl_find(&cq->cq_wrid_wqhdr_avl_tree, &cmp, &where);
2511 2466          avl_insert(&cq->cq_wrid_wqhdr_avl_tree, wqavl, where);
2512 2467  }
2513 2468  
2514 2469  
2515 2470  /*
2516 2471   * hermon_cq_workq_remove()
2517 2472   *    Context: Can be called from interrupt or base context.
2518 2473   */
2519 2474  static void
2520 2475  hermon_cq_workq_remove(hermon_cqhdl_t cq, hermon_workq_avl_t *wqavl)
2521 2476  {
2522      -#ifdef __lock_lint
2523      -        hermon_wrid_workq_compare(NULL, NULL);
2524      -#endif
2525 2477          avl_remove(&cq->cq_wrid_wqhdr_avl_tree, wqavl);
2526 2478  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX