Print this page
5285 pass in cpu_pause_func via pause_cpus


 455 
 456         /*
 457          * suspend interrupts and devices
 458          */
 459         if (xpvd_dip != NULL)
 460                 (void) xen_suspend_devices(ddi_get_child(xpvd_dip));
 461         else
 462                 cmn_err(CE_WARN, "No PV devices found to suspend");
 463         SUSPEND_DEBUG("xenbus_suspend\n");
 464         xenbus_suspend();
 465 
 466         mutex_enter(&cpu_lock);
 467 
 468         /*
 469          * Suspend on vcpu 0
 470          */
 471         thread_affinity_set(curthread, 0);
 472         kpreempt_disable();
 473 
 474         if (ncpus > 1)
 475                 pause_cpus(NULL);
 476         /*
 477          * We can grab the ec_lock as it's a spinlock with a high SPL. Hence
 478          * any holder would have dropped it to get through pause_cpus().
 479          */
 480         mutex_enter(&ec_lock);
 481 
 482         /*
 483          * From here on in, we can't take locks.
 484          */
 485 
 486         flags = intr_clear();
 487 
 488         SUSPEND_DEBUG("HYPERVISOR_suspend\n");
 489         /*
 490          * At this point we suspend and sometime later resume.
 491          * Note that this call may return with an indication of a cancelled
 492          * for now no matter ehat the return we do a full resume of all
 493          * suspended drivers, etc.
 494          */
 495         (void) HYPERVISOR_shutdown(SHUTDOWN_suspend);




 455 
 456         /*
 457          * suspend interrupts and devices
 458          */
 459         if (xpvd_dip != NULL)
 460                 (void) xen_suspend_devices(ddi_get_child(xpvd_dip));
 461         else
 462                 cmn_err(CE_WARN, "No PV devices found to suspend");
 463         SUSPEND_DEBUG("xenbus_suspend\n");
 464         xenbus_suspend();
 465 
 466         mutex_enter(&cpu_lock);
 467 
 468         /*
 469          * Suspend on vcpu 0
 470          */
 471         thread_affinity_set(curthread, 0);
 472         kpreempt_disable();
 473 
 474         if (ncpus > 1)
 475                 pause_cpus(NULL, NULL);
 476         /*
 477          * We can grab the ec_lock as it's a spinlock with a high SPL. Hence
 478          * any holder would have dropped it to get through pause_cpus().
 479          */
 480         mutex_enter(&ec_lock);
 481 
 482         /*
 483          * From here on in, we can't take locks.
 484          */
 485 
 486         flags = intr_clear();
 487 
 488         SUSPEND_DEBUG("HYPERVISOR_suspend\n");
 489         /*
 490          * At this point we suspend and sometime later resume.
 491          * Note that this call may return with an indication of a cancelled
 492          * for now no matter ehat the return we do a full resume of all
 493          * suspended drivers, etc.
 494          */
 495         (void) HYPERVISOR_shutdown(SHUTDOWN_suspend);