Print this page
patch cpu-pause-func-deglobalize

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