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

*** 73,84 **** { hermon_cmd_t *cmdptr; int status, retry_cnt, retry_cnt2, hw_err; uint16_t token; - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*cmdpost)) - /* Determine if we are going to spin until completion */ if (cmdpost->cp_flags == HERMON_CMD_NOSLEEP_SPIN) { /* Write the command to the HCR */ retry_cnt = HCA_PIO_RETRY_CNT; --- 73,82 ----
*** 111,121 **** status = hermon_outstanding_cmd_alloc(state, &cmdptr, cmdpost->cp_flags); if (status != HERMON_CMD_SUCCESS) { return (status); } - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*cmdptr)) retry_cnt = HCA_PIO_RETRY_CNT; retry: /* * Set status to "HERMON_CMD_INVALID_STATUS". It is --- 109,118 ----
*** 155,181 **** HCA_ERR_TRANSIENT); } /* * cv_wait() on the "command_complete" condition variable. - * Note: We have the "__lock_lint" here to workaround warlock. - * Since warlock doesn't know that other parts of the Hermon - * may occasionally call this routine while holding their own - * locks, it complains about this cv_wait. In reality, - * however, the rest of the driver never calls this routine - * with a lock held unless they pass HERMON_CMD_NOSLEEP. */ - _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*cmdptr)) mutex_enter(&cmdptr->cmd_comp_lock); while (cmdptr->cmd_status == HERMON_CMD_INVALID_STATUS) { - #ifndef __lock_lint - cv_wait(&cmdptr->cmd_comp_cv, &cmdptr->cmd_comp_lock); /* NOTE: EXPECT SEVERAL THREADS TO BE WAITING HERE */ ! #endif } mutex_exit(&cmdptr->cmd_comp_lock); - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*cmdptr)) /* * Wake up after command completes (cv_signal). Read status * from the command (success, fail, etc.). It is appropriate * here (as above) to read the status field without the --- 152,168 ---- HCA_ERR_TRANSIENT); } /* * cv_wait() on the "command_complete" condition variable. */ mutex_enter(&cmdptr->cmd_comp_lock); while (cmdptr->cmd_status == HERMON_CMD_INVALID_STATUS) { /* NOTE: EXPECT SEVERAL THREADS TO BE WAITING HERE */ ! cv_wait(&cmdptr->cmd_comp_cv, &cmdptr->cmd_comp_lock); } mutex_exit(&cmdptr->cmd_comp_lock); /* * Wake up after command completes (cv_signal). Read status * from the command (success, fail, etc.). It is appropriate * here (as above) to read the status field without the
*** 339,349 **** } } } /* Store appropriate context in mbox_info */ - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(mbox_info->mbi_sleep_context)) mbox_info->mbi_sleep_context = sleep_context; return (HERMON_CMD_SUCCESS); } --- 326,335 ----
*** 359,369 **** * The mailbox has to be freed in the same context from which it was * allocated. The context is stored in the mbox_info at * hermon_mbox_alloc() time. We check the stored context against the * current context here. */ - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(mbox_info->mbi_sleep_context)) ASSERT(mbox_info->mbi_sleep_context == HERMON_SLEEPFLAG_FOR_CONTEXT()); /* Determine correct mboxlist based on calling context */ if (mbox_info->mbi_sleep_context == HERMON_NOSLEEP) { /* Free the intr "In" mailbox */ --- 345,354 ----
*** 601,624 **** * Grab lock here as we prepare to cv_wait if needed. */ mutex_enter(&mblist->mbl_lock); while (mblist->mbl_entries_free == 0) { /* ! * Wait (on cv) for a mailbox to become free. Note: ! * Just as we do above in hermon_cmd_post(), we also ! * have the "__lock_lint" here to workaround warlock. ! * Warlock doesn't know that other parts of the Hermon ! * may occasionally call this routine while holding ! * their own locks, so it complains about this cv_wait. ! * In reality, however, the rest of the driver never ! * calls this routine with a lock held unless they pass ! * HERMON_CMD_NOSLEEP. */ mblist->mbl_waiters++; - #ifndef __lock_lint cv_wait(&mblist->mbl_cv, &mblist->mbl_lock); - #endif } } /* Grab the next available mailbox from list */ mbox_ptr = mblist->mbl_mbox; --- 586,599 ---- * Grab lock here as we prepare to cv_wait if needed. */ mutex_enter(&mblist->mbl_lock); while (mblist->mbl_entries_free == 0) { /* ! * Wait (on cv) for a mailbox to become free. */ mblist->mbl_waiters++; cv_wait(&mblist->mbl_cv, &mblist->mbl_lock); } } /* Grab the next available mailbox from list */ mbox_ptr = mblist->mbl_mbox;
*** 876,904 **** mutex_exit(&cmd_list->cml_lock); return (HERMON_CMD_INSUFF_RSRC); } /* ! * Wait (on cv) for a command to become free. Note: Just ! * as we do above in hermon_cmd_post(), we also have the ! * "__lock_lint" here to workaround warlock. Warlock doesn't ! * know that other parts of the Hermon may occasionally call ! * this routine while holding their own locks, so it complains ! * about this cv_wait. In reality, however, the rest of the ! * driver never calls this routine with a lock held unless ! * they pass HERMON_CMD_NOSLEEP. */ cmd_list->cml_waiters++; - #ifndef __lock_lint cv_wait(&cmd_list->cml_cv, &cmd_list->cml_lock); - #endif } /* Grab the next available command from the list */ head = cmd_list->cml_head_indx; *cmd_ptr = &cmd_list->cml_cmd[head]; - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(**cmd_ptr)) next = (*cmd_ptr)->cmd_next; prev = (*cmd_ptr)->cmd_prev; (*cmd_ptr)->cmd_status = HERMON_CMD_INVALID_STATUS; /* Remove it from the command list */ --- 851,869 ---- mutex_exit(&cmd_list->cml_lock); return (HERMON_CMD_INSUFF_RSRC); } /* ! * Wait (on cv) for a command to become free. */ cmd_list->cml_waiters++; cv_wait(&cmd_list->cml_cv, &cmd_list->cml_lock); } /* Grab the next available command from the list */ head = cmd_list->cml_head_indx; *cmd_ptr = &cmd_list->cml_cmd[head]; next = (*cmd_ptr)->cmd_next; prev = (*cmd_ptr)->cmd_prev; (*cmd_ptr)->cmd_status = HERMON_CMD_INVALID_STATUS; /* Remove it from the command list */
*** 993,1009 **** * Grab the "HCR access" lock if the driver is not in * fastreboot. In fastreboot, this function is called * with the single thread but in high interrupt context * (so that this mutex lock cannot be used). */ - #ifdef __lock_lint - mutex_enter(&state->hs_cmd_regs.hcr_lock); - #else if (!HERMON_IN_FASTREBOOT(state)) { mutex_enter(&state->hs_cmd_regs.hcr_lock); } - #endif hcr = state->hs_cmd_regs.hcr; /* * First, check the "go" bit to see if any previous hcr usage is * complete. As long as it is set then we must continue to poll. --- 958,970 ----
*** 1031,1047 **** /* * If we poll more than the maximum number of times, then * return a "timeout" error. */ if (++count > countmax) { - #ifdef __lock_lint - mutex_exit(&state->hs_cmd_regs.hcr_lock); - #else if (!HERMON_IN_FASTREBOOT(state)) { mutex_exit(&state->hs_cmd_regs.hcr_lock); } - #endif cmn_err(CE_NOTE, "write_hcr: cannot start cmd"); return (HERMON_CMD_TIMEOUT_GOBIT); } } --- 992,1004 ----
*** 1128,1145 **** /* * If we poll more than the maximum number of times, * then return a "timeout" error. */ if (++count > countmax) { - #ifdef __lock_lint - mutex_exit(&state-> hs_cmd_regs.hcr_lock); - #else if (!HERMON_IN_FASTREBOOT(state)) { mutex_exit(&state-> hs_cmd_regs.hcr_lock); } - #endif cmn_err(CE_NOTE, "write_hcr: cannot complete cmd"); return (HERMON_CMD_TIMEOUT_GOBIT); } } --- 1085,1098 ----
*** 1170,1186 **** } else { /* NOSPIN */ status = HERMON_CMD_SUCCESS; } /* Drop the "HCR access" lock */ - #ifdef __lock_lint - mutex_exit(&state->hs_cmd_regs.hcr_lock); - #else if (!HERMON_IN_FASTREBOOT(state)) { mutex_exit(&state->hs_cmd_regs.hcr_lock); } - #endif if (hw_error == B_TRUE) { *hw_err = HCA_PIO_TRANSIENT; } else { *hw_err = HCA_PIO_OK; } --- 1123,1135 ----
*** 1190,1206 **** } #endif return (status); pio_error: - #ifdef __lock_lint - mutex_exit(&state->hs_cmd_regs.hcr_lock); - #else if (!HERMON_IN_FASTREBOOT(state)) { mutex_exit(&state->hs_cmd_regs.hcr_lock); } - #endif hermon_fm_ereport(state, HCA_SYS_ERR, HCA_ERR_NON_FATAL); *hw_err = HCA_PIO_PERSISTENT; return (HERMON_CMD_INVALID_STATUS); } --- 1139,1151 ----
*** 2029,2039 **** * swapping that may be necessary to flip any of the "portinfo" * fields */ bcopy((void *)((uintptr_t)mbox_info.mbi_out->mb_addr + HERMON_CMD_MADDATA_OFFSET), portinfo, size); - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*portinfo)) HERMON_GETPORTINFO_SWAP(portinfo); getportinfo_fail: /* Free the mailbox */ hermon_mbox_free(state, &mbox_info); --- 1974,1983 ----
*** 2350,2360 **** * swapping that may be necessary to flip any of the "nodeinfo" * fields */ bcopy((void *)((uintptr_t)mbox_info.mbi_out->mb_addr + HERMON_CMD_MADDATA_OFFSET), nodeinfo, size); - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*nodeinfo)) HERMON_GETNODEINFO_SWAP(nodeinfo); getnodeinfo_fail: /* Free the mailbox */ hermon_mbox_free(state, &mbox_info); --- 2294,2303 ----
*** 2489,2499 **** * Copy GetGUIDInfo response MAD into "guidinfo". Do any endian * swapping that may be necessary to flip the "guidinfo" fields */ bcopy((void *)((uintptr_t)mbox_info.mbi_out->mb_addr + HERMON_CMD_MADDATA_OFFSET), guidinfo, size); - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*guidinfo)) HERMON_GETGUIDINFO_SWAP(guidinfo); getguidinfo_fail: /* Free the mailbox */ hermon_mbox_free(state, &mbox_info); --- 2432,2441 ----
*** 2561,2571 **** * Copy GetPKeyTable response MAD into "pkeytable". Do any endian * swapping that may be necessary to flip the "pkeytable" fields */ bcopy((void *)((uintptr_t)mbox_info.mbi_out->mb_addr + HERMON_CMD_MADDATA_OFFSET), pkeytable, size); - _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*pkeytable)) HERMON_GETPKEYTABLE_SWAP(pkeytable); getpkeytable_fail: /* Free the mailbox */ hermon_mbox_free(state, &mbox_info); --- 2503,2512 ----