Print this page
XXXX pass in cpu_pause_func via pause_cpus


 252 
 253         if (ncpus > 1) {
 254                 sfmmu_init_tsbs();
 255 
 256                 mutex_enter(&cpu_lock);
 257                 /*
 258                  * All of the slave cpus are not ready at this time,
 259                  * yet the cpu structures have various cpu_flags set;
 260                  * clear cpu_flags and mutex_ready.
 261                  * Since we are coming up from a CPU suspend, the slave cpus
 262                  * are frozen.
 263                  */
 264                 for (cp = CPU->cpu_next; cp != CPU; cp = cp->cpu_next) {
 265                         cp->cpu_flags = CPU_FROZEN;
 266                         cp->cpu_m.mutex_ready = 0;
 267                 }
 268 
 269                 for (cp = CPU->cpu_next; cp != CPU; cp = cp->cpu_next)
 270                         restart_other_cpu(cp->cpu_id);
 271 
 272                 pause_cpus(NULL);
 273                 mutex_exit(&cpu_lock);
 274 
 275                 i_cpr_xcall(i_cpr_clear_entries);
 276         } else
 277                 i_cpr_clear_entries(0, 0);
 278 
 279         /*
 280          * now unlink the cif wrapper;  WARNING: do not call any
 281          * prom_xxx() routines until after prom pages are restored.
 282          */
 283         i_cpr_cif_setup(CIF_UNLINK);
 284 
 285         (void) i_cpr_prom_pages(CPR_PROM_RESTORE);
 286 
 287         /* allow setting page size codes in MMU primary context register */
 288         kcontextreg = kctx;
 289 }
 290 
 291 
 292 /*




 252 
 253         if (ncpus > 1) {
 254                 sfmmu_init_tsbs();
 255 
 256                 mutex_enter(&cpu_lock);
 257                 /*
 258                  * All of the slave cpus are not ready at this time,
 259                  * yet the cpu structures have various cpu_flags set;
 260                  * clear cpu_flags and mutex_ready.
 261                  * Since we are coming up from a CPU suspend, the slave cpus
 262                  * are frozen.
 263                  */
 264                 for (cp = CPU->cpu_next; cp != CPU; cp = cp->cpu_next) {
 265                         cp->cpu_flags = CPU_FROZEN;
 266                         cp->cpu_m.mutex_ready = 0;
 267                 }
 268 
 269                 for (cp = CPU->cpu_next; cp != CPU; cp = cp->cpu_next)
 270                         restart_other_cpu(cp->cpu_id);
 271 
 272                 pause_cpus(NULL, NULL);
 273                 mutex_exit(&cpu_lock);
 274 
 275                 i_cpr_xcall(i_cpr_clear_entries);
 276         } else
 277                 i_cpr_clear_entries(0, 0);
 278 
 279         /*
 280          * now unlink the cif wrapper;  WARNING: do not call any
 281          * prom_xxx() routines until after prom pages are restored.
 282          */
 283         i_cpr_cif_setup(CIF_UNLINK);
 284 
 285         (void) i_cpr_prom_pages(CPR_PROM_RESTORE);
 286 
 287         /* allow setting page size codes in MMU primary context register */
 288         kcontextreg = kctx;
 289 }
 290 
 291 
 292 /*