Print this page
8368 remove warlock leftovers from usr/src/uts
@@ -73,12 +73,10 @@
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, "");
@@ -106,11 +104,10 @@
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
@@ -131,27 +128,17 @@
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
+ cv_wait(&cmdptr->cmd_comp_cv, &cmdptr->cmd_comp_lock);
}
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
@@ -249,11 +236,10 @@
}
}
}
/* 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);
}
@@ -272,11 +258,10 @@
* 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 */
@@ -577,24 +562,14 @@
* 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.
+ * Wait (on cv) for a mailbox to become free.
*/
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;
@@ -885,29 +860,19 @@
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.
+ * Wait (on cv) for a command to become free.
*/
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 */
@@ -1003,17 +968,13 @@
* 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
@@ -1037,17 +998,13 @@
/*
* 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);
}
@@ -1104,18 +1061,14 @@
/*
* 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);
}
@@ -1138,17 +1091,13 @@
} 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);
}
@@ -1804,15 +1753,13 @@
/*
* 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);
@@ -2038,15 +1985,13 @@
/*
* 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);
@@ -2117,15 +2062,13 @@
/*
* 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);