Print this page
XXXX pass in cpu_pause_func via pause_cpus
*** 88,98 ****
int cpr_suspend_succeeded;
pfn_t curthreadpfn;
int curthreadremapped;
extern cpuset_t cpu_ready_set;
- extern void *(*cpu_pause_func)(void *);
extern processorid_t i_cpr_bootcpuid(void);
extern cpu_t *i_cpr_bootcpu(void);
extern void tsc_adjust_delta(hrtime_t tdelta);
extern void tsc_resume(void);
--- 88,97 ----
*** 414,425 ****
PMD(PMD_SX, ("curthread running on bootcpu\n"))
/*
* pause all other running CPUs and save the CPU state at the sametime
*/
! cpu_pause_func = i_cpr_save_context;
! pause_cpus(NULL);
mutex_exit(&cpu_lock);
return (0);
}
--- 413,423 ----
PMD(PMD_SX, ("curthread running on bootcpu\n"))
/*
* pause all other running CPUs and save the CPU state at the sametime
*/
! pause_cpus(NULL, i_cpr_save_context);
mutex_exit(&cpu_lock);
return (0);
}
*** 790,805 ****
i_cpr_post_resume_cpus();
mutex_enter(&cpu_lock);
/*
- * Restore this cpu to use the regular cpu_pause(), so that
- * online and offline will work correctly
- */
- cpu_pause_func = NULL;
-
- /*
* clear the affinity set in cpr_suspend_cpus()
*/
affinity_clear();
/*
--- 788,797 ----
*** 818,834 ****
*/
PMD(PMD_SX, ("cpr_unpause_cpus: restoring system\n"))
mutex_enter(&cpu_lock);
-
- /*
- * Restore this cpu to use the regular cpu_pause(), so that
- * online and offline will work correctly
- */
- cpu_pause_func = NULL;
-
/*
* Restart the paused cpus
*/
start_cpus();
--- 810,819 ----
*** 1092,1102 ****
* apart from the current cpu, so that broken drivers that think
* that they are on a uniprocessor machine will resume
*/
if (cpr_resume_uniproc) {
mutex_enter(&cpu_lock);
! pause_cpus(NULL);
mutex_exit(&cpu_lock);
}
#endif
/*
--- 1077,1087 ----
* apart from the current cpu, so that broken drivers that think
* that they are on a uniprocessor machine will resume
*/
if (cpr_resume_uniproc) {
mutex_enter(&cpu_lock);
! pause_cpus(NULL, NULL);
mutex_exit(&cpu_lock);
}
#endif
/*