Print this page
XXXX pass in cpu_pause_func via pause_cpus


 918          * if watchdog was activated, disable it
 919          */
 920         if (watchdog_activated) {
 921                 mutex_enter(&tod_lock);
 922                 tod_ops.tod_clear_watchdog_timer();
 923                 mutex_exit(&tod_lock);
 924                 srh->sr_flags |= SR_FLAG_WATCHDOG;
 925         } else {
 926                 srh->sr_flags &= ~(SR_FLAG_WATCHDOG);
 927         }
 928 
 929         /*
 930          * Update the signature block.
 931          * This must be done before cpus are paused, since on Starcat the
 932          * cpu signature update aquires an adaptive mutex in the iosram driver.
 933          * Blocking with cpus paused can lead to deadlock.
 934          */
 935         CPU_SIGNATURE(OS_SIG, SIGST_QUIESCED, SIGSUBST_NULL, CPU->cpu_id);
 936 
 937         mutex_enter(&cpu_lock);
 938         pause_cpus(NULL);
 939         dr_stop_intr();
 940 
 941         return (rc);
 942 }
 943 
 944 int
 945 dr_pt_test_suspend(dr_handle_t *hp)
 946 {
 947         dr_sr_handle_t *srh;
 948         int             err;
 949         uint_t          psmerr;
 950         static fn_t     f = "dr_pt_test_suspend";
 951 
 952         PR_QR("%s...\n", f);
 953 
 954         srh = dr_get_sr_handle(hp);
 955         if ((err = dr_suspend(srh)) == DDI_SUCCESS) {
 956                 dr_resume(srh);
 957                 if ((hp->h_err) && ((psmerr = hp->h_err->e_code) != 0)) {
 958                         PR_QR("%s: error on dr_resume()", f);




 918          * if watchdog was activated, disable it
 919          */
 920         if (watchdog_activated) {
 921                 mutex_enter(&tod_lock);
 922                 tod_ops.tod_clear_watchdog_timer();
 923                 mutex_exit(&tod_lock);
 924                 srh->sr_flags |= SR_FLAG_WATCHDOG;
 925         } else {
 926                 srh->sr_flags &= ~(SR_FLAG_WATCHDOG);
 927         }
 928 
 929         /*
 930          * Update the signature block.
 931          * This must be done before cpus are paused, since on Starcat the
 932          * cpu signature update aquires an adaptive mutex in the iosram driver.
 933          * Blocking with cpus paused can lead to deadlock.
 934          */
 935         CPU_SIGNATURE(OS_SIG, SIGST_QUIESCED, SIGSUBST_NULL, CPU->cpu_id);
 936 
 937         mutex_enter(&cpu_lock);
 938         pause_cpus(NULL, NULL);
 939         dr_stop_intr();
 940 
 941         return (rc);
 942 }
 943 
 944 int
 945 dr_pt_test_suspend(dr_handle_t *hp)
 946 {
 947         dr_sr_handle_t *srh;
 948         int             err;
 949         uint_t          psmerr;
 950         static fn_t     f = "dr_pt_test_suspend";
 951 
 952         PR_QR("%s...\n", f);
 953 
 954         srh = dr_get_sr_handle(hp);
 955         if ((err = dr_suspend(srh)) == DDI_SUCCESS) {
 956                 dr_resume(srh);
 957                 if ((hp->h_err) && ((psmerr = hp->h_err->e_code) != 0)) {
 958                         PR_QR("%s: error on dr_resume()", f);