Print this page
8368 remove warlock leftovers from usr/src/uts
*** 73,84 ****
int status;
uint16_t token;
TAVOR_TNF_ENTER(tavor_cmd_post);
- _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*cmdpost))
-
/* Determine if we are going to spin until completion */
if (cmdpost->cp_flags == TAVOR_CMD_NOSLEEP_SPIN) {
TNF_PROBE_0_DEBUG(tavor_cmd_post_spin, TAVOR_TNF_TRACE, "");
--- 73,82 ----
*** 106,116 ****
if (status != TAVOR_CMD_SUCCESS) {
TNF_PROBE_0(tavor_cmd_alloc_fail, TAVOR_TNF_ERROR, "");
TAVOR_TNF_EXIT(tavor_cmd_post);
return (status);
}
- _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*cmdptr))
/*
* Set status to "TAVOR_CMD_INVALID_STATUS". It is
* appropriate to do this here without the "cmd_comp_lock"
* because this register is overloaded. Later it will be
--- 104,113 ----
*** 131,157 ****
return (status);
}
/*
* 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 Tavor
- * 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 TAVOR_CMD_NOSLEEP.
*/
- _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*cmdptr))
mutex_enter(&cmdptr->cmd_comp_lock);
while (cmdptr->cmd_status == TAVOR_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
--- 128,144 ----
return (status);
}
/*
* cv_wait() on the "command_complete" condition variable.
*/
mutex_enter(&cmdptr->cmd_comp_lock);
while (cmdptr->cmd_status == TAVOR_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
*** 249,259 ****
}
}
}
/* Store appropriate context in mbox_info */
- _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(mbox_info->mbi_sleep_context))
mbox_info->mbi_sleep_context = sleep_context;
TAVOR_TNF_EXIT(tavor_mbox_alloc);
return (TAVOR_CMD_SUCCESS);
}
--- 236,245 ----
*** 272,282 ****
* The mailbox has to be freed in the same context from which it was
* allocated. The context is stored in the mbox_info at
* tavor_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 == TAVOR_SLEEPFLAG_FOR_CONTEXT());
/* Determine correct mboxlist based on calling context */
if (mbox_info->mbi_sleep_context == TAVOR_NOSLEEP) {
/* Free the intr "In" mailbox */
--- 258,267 ----
*** 577,600 ****
* 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 tavor_cmd_post(), we also
! * have the "__lock_lint" here to workaround warlock.
! * Warlock doesn't know that other parts of the Tavor
! * 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
! * TAVOR_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;
--- 562,575 ----
* 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;
*** 885,913 ****
TAVOR_TNF_EXIT(tavor_outstanding_cmd_alloc);
return (TAVOR_CMD_INSUFF_RSRC);
}
/*
! * Wait (on cv) for a command to become free. Note: Just
! * as we do above in tavor_cmd_post(), we also have the
! * "__lock_lint" here to workaround warlock. Warlock doesn't
! * know that other parts of the Tavor 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 TAVOR_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 = TAVOR_CMD_INVALID_STATUS;
/* Remove it from the command list */
--- 860,878 ----
TAVOR_TNF_EXIT(tavor_outstanding_cmd_alloc);
return (TAVOR_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 = TAVOR_CMD_INVALID_STATUS;
/* Remove it from the command list */
*** 1003,1019 ****
* 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->ts_cmd_regs.hcr_lock);
- #else
if (!TAVOR_IN_FASTREBOOT(state)) {
mutex_enter(&state->ts_cmd_regs.hcr_lock);
}
- #endif
hcr = state->ts_cmd_regs.hcr;
/*
* First, check the "go" bit to see if the previous hcr usage is
--- 968,980 ----
*** 1037,1053 ****
/*
* If we poll more than the maximum number of times, then
* return a "timeout" error.
*/
if (++count > countmax) {
- #ifdef __lock_lint
- mutex_exit(&state->ts_cmd_regs.hcr_lock);
- #else
if (!TAVOR_IN_FASTREBOOT(state)) {
mutex_exit(&state->ts_cmd_regs.hcr_lock);
}
- #endif
TNF_PROBE_0(tavor_write_hcr_timeout1, TAVOR_TNF_ERROR,
"");
TAVOR_TNF_EXIT(tavor_write_hcr);
return (TAVOR_CMD_TIMEOUT);
}
--- 998,1010 ----
*** 1104,1121 ****
/*
* If we poll more than the maximum number of times,
* then return a "timeout" error.
*/
if (++count > countmax) {
- #ifdef __lock_lint
- mutex_exit(&state-> ts_cmd_regs.hcr_lock);
- #else
if (!TAVOR_IN_FASTREBOOT(state)) {
mutex_exit(&state->
ts_cmd_regs.hcr_lock);
}
- #endif
TNF_PROBE_0(tavor_write_hcr_timeout2,
TAVOR_TNF_ERROR, "");
TAVOR_TNF_EXIT(tavor_write_hcr);
return (TAVOR_CMD_TIMEOUT);
}
--- 1061,1074 ----
*** 1138,1154 ****
} else {
status = TAVOR_CMD_SUCCESS;
}
/* Drop the "HCR access" lock */
- #ifdef __lock_lint
- mutex_exit(&state->ts_cmd_regs.hcr_lock);
- #else
if (!TAVOR_IN_FASTREBOOT(state)) {
mutex_exit(&state->ts_cmd_regs.hcr_lock);
}
- #endif
TAVOR_TNF_EXIT(tavor_write_hcr);
return (status);
}
--- 1091,1103 ----
*** 1804,1818 ****
/*
* Copy GetPortInfo response MAD into "portinfo". Do any endian
* swapping that may be necessary to flip any of the "portinfo"
* fields
*/
- _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*portinfo))
bcopy((void *)((uintptr_t)mbox_info.mbi_out->mb_addr +
TAVOR_CMD_MADDATA_OFFSET), portinfo, size);
TAVOR_GETPORTINFO_SWAP(portinfo);
- _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*portinfo))
getportinfo_fail:
/* Free the mailbox */
tavor_mbox_free(state, &mbox_info);
--- 1753,1765 ----
*** 2038,2052 ****
/*
* Copy GetGUIDInfo response MAD into "guidinfo". Do any endian
* swapping that may be necessary to flip the "guidinfo" fields
*/
- _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*guidinfo))
bcopy((void *)((uintptr_t)mbox_info.mbi_out->mb_addr +
TAVOR_CMD_MADDATA_OFFSET), guidinfo, size);
TAVOR_GETGUIDINFO_SWAP(guidinfo);
- _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*guidinfo))
getguidinfo_fail:
/* Free the mailbox */
tavor_mbox_free(state, &mbox_info);
--- 1985,1997 ----
*** 2117,2131 ****
/*
* Copy GetPKeyTable response MAD into "pkeytable". Do any endian
* swapping that may be necessary to flip the "pkeytable" fields
*/
- _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*pkeytable))
bcopy((void *)((uintptr_t)mbox_info.mbi_out->mb_addr +
TAVOR_CMD_MADDATA_OFFSET), pkeytable, size);
TAVOR_GETPKEYTABLE_SWAP(pkeytable);
- _NOTE(NOW_VISIBLE_TO_OTHER_THREADS(*pkeytable))
getpkeytable_fail:
/* Free the mailbox */
tavor_mbox_free(state, &mbox_info);
--- 2062,2074 ----