Print this page
5285 pass in cpu_pause_func via pause_cpus

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4/os/prom_subr.c
          +++ new/usr/src/uts/sun4/os/prom_subr.c
↓ open down ↓ 400 lines elided ↑ open up ↑
 401  401          }
 402  402  }
 403  403  
 404  404  /*
 405  405   * This routine is a special form of pause_cpus().  It ensures that
 406  406   * prom functions are callable while the cpus are paused.
 407  407   */
 408  408  void
 409  409  promsafe_pause_cpus(void)
 410  410  {
 411      -        pause_cpus(NULL);
      411 +        pause_cpus(NULL, NULL);
 412  412  
 413  413          /* If some other cpu is entering or is in the prom, spin */
 414  414          while (prom_cpu || mutex_owner(&prom_mutex)) {
 415  415  
 416  416                  start_cpus();
 417  417                  mutex_enter(&prom_mutex);
 418  418  
 419  419                  /* Wait for other cpu to exit prom */
 420  420                  while (prom_cpu)
 421  421                          cv_wait(&prom_cv, &prom_mutex);
 422  422  
 423  423                  mutex_exit(&prom_mutex);
 424      -                pause_cpus(NULL);
      424 +                pause_cpus(NULL, NULL);
 425  425          }
 426  426  
 427  427          /* At this point all cpus are paused and none are in the prom */
 428  428  }
 429  429  
 430  430  /*
 431  431   * This routine is a special form of xc_attention().  It ensures that
 432  432   * prom functions are callable while the cpus are at attention.
 433  433   */
 434  434  void
↓ open down ↓ 155 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX