Print this page
XXXX pass in cpu_pause_func via pause_cpus


 720                 return (ret);
 721         }
 722 }
 723 
 724 /*
 725  * Stop all other cpu's before halting or rebooting. We pause the cpu's
 726  * instead of sending a cross call.
 727  * Stolen from sun4/os/mp_states.c
 728  */
 729 
 730 static int cpu_are_paused;      /* sic */
 731 
 732 void
 733 i_cpr_stop_other_cpus(void)
 734 {
 735         mutex_enter(&cpu_lock);
 736         if (cpu_are_paused) {
 737                 mutex_exit(&cpu_lock);
 738                 return;
 739         }
 740         pause_cpus(NULL);
 741         cpu_are_paused = 1;
 742 
 743         mutex_exit(&cpu_lock);
 744 }
 745 
 746 int
 747 i_cpr_is_supported(int sleeptype)
 748 {
 749         extern int cpr_supported_override;
 750         extern int cpr_platform_enable;
 751         extern int pm_S3_enabled;
 752 
 753         if (sleeptype != CPR_TORAM)
 754                 return (0);
 755 
 756         /*
 757          * The next statement tests if a specific platform has turned off
 758          * cpr support.
 759          */
 760         if (cpr_supported_override)




 720                 return (ret);
 721         }
 722 }
 723 
 724 /*
 725  * Stop all other cpu's before halting or rebooting. We pause the cpu's
 726  * instead of sending a cross call.
 727  * Stolen from sun4/os/mp_states.c
 728  */
 729 
 730 static int cpu_are_paused;      /* sic */
 731 
 732 void
 733 i_cpr_stop_other_cpus(void)
 734 {
 735         mutex_enter(&cpu_lock);
 736         if (cpu_are_paused) {
 737                 mutex_exit(&cpu_lock);
 738                 return;
 739         }
 740         pause_cpus(NULL, NULL);
 741         cpu_are_paused = 1;
 742 
 743         mutex_exit(&cpu_lock);
 744 }
 745 
 746 int
 747 i_cpr_is_supported(int sleeptype)
 748 {
 749         extern int cpr_supported_override;
 750         extern int cpr_platform_enable;
 751         extern int pm_S3_enabled;
 752 
 753         if (sleeptype != CPR_TORAM)
 754                 return (0);
 755 
 756         /*
 757          * The next statement tests if a specific platform has turned off
 758          * cpr support.
 759          */
 760         if (cpr_supported_override)