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

@@ -73,12 +73,10 @@
 {
         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;

@@ -111,11 +109,10 @@
                 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

@@ -155,27 +152,17 @@
                             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
+                        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

@@ -339,11 +326,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;
 
         return (HERMON_CMD_SUCCESS);
 }
 

@@ -359,11 +345,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
          * 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 */

@@ -601,24 +586,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 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.
+                         * 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;

@@ -876,29 +851,19 @@
                         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.
+                 * 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 = HERMON_CMD_INVALID_STATUS;
 
         /* Remove it from the command list */

@@ -993,17 +958,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->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.

@@ -1031,17 +992,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->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);
                 }
         }
 

@@ -1128,18 +1085,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-> 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);
                         }
                 }

@@ -1170,17 +1123,13 @@
         } 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;
         }

@@ -1190,17 +1139,13 @@
         }
 #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);
 }
 

@@ -2029,11 +1974,10 @@
          * 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);

@@ -2350,11 +2294,10 @@
          * 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);

@@ -2489,11 +2432,10 @@
          * 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);

@@ -2561,11 +2503,10 @@
          * 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);