Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4u/cpu/us3_common.c
          +++ new/usr/src/uts/sun4u/cpu/us3_common.c
↓ open down ↓ 2432 lines elided ↑ open up ↑
2433 2433  
2434 2434                          if (page_retire_check(aflt->flt_addr, NULL) == 0) {
2435 2435                                  if (ch_flt->flt_trapped_ce & CE_CEEN_DEFER) {
2436 2436  
2437 2437                                  /*
2438 2438                                   * Since we're skipping logging, we'll need
2439 2439                                   * to schedule the re-enabling of CEEN
2440 2440                                   */
2441 2441                                  (void) timeout(cpu_delayed_check_ce_errors,
2442 2442                                      (void *)(uintptr_t)aflt->flt_inst,
2443      -                                    drv_usectohz((clock_t)cpu_ceen_delay_secs
2444      -                                    * MICROSEC));
     2443 +                                    drv_sectohz((clock_t)cpu_ceen_delay_secs));
2445 2444                                  }
2446 2445  
2447 2446                                  /*
2448 2447                                   * Inform memscrubber - scrubbing induced
2449 2448                                   * CE on a retired page.
2450 2449                                   */
2451 2450                                  memscrub_induced_error();
2452 2451                                  return (0);
2453 2452                          }
2454 2453                  }
↓ open down ↓ 206 lines elided ↑ open up ↑
2661 2660           * If we have a CEEN error , we do not reenable CEEN until after
2662 2661           * we exit the trap handler. Otherwise, another error may
2663 2662           * occur causing the handler to be entered recursively.
2664 2663           * We set a timeout to trigger in cpu_ceen_delay_secs seconds,
2665 2664           * to try and ensure that the CPU makes progress in the face
2666 2665           * of a CE storm.
2667 2666           */
2668 2667          if (ch_flt->flt_trapped_ce & CE_CEEN_DEFER) {
2669 2668                  (void) timeout(cpu_delayed_check_ce_errors,
2670 2669                      (void *)(uintptr_t)aflt->flt_inst,
2671      -                    drv_usectohz((clock_t)cpu_ceen_delay_secs * MICROSEC));
     2670 +                    drv_sectohz((clock_t)cpu_ceen_delay_secs));
2672 2671          }
2673 2672  }
2674 2673  
2675 2674  /*
2676 2675   * Invoked by error_init() early in startup and therefore before
2677 2676   * startup_errorq() is called to drain any error Q -
2678 2677   *
2679 2678   * startup()
2680 2679   *   startup_end()
2681 2680   *     error_init()
↓ open down ↓ 3383 lines elided ↑ open up ↑
6065 6064  
6066 6065  /*
6067 6066   * Timeout function to reenable CE
6068 6067   */
6069 6068  static void
6070 6069  cpu_delayed_check_ce_errors(void *arg)
6071 6070  {
6072 6071          if (!taskq_dispatch(ch_check_ce_tq, cpu_check_ce_errors, arg,
6073 6072              TQ_NOSLEEP)) {
6074 6073                  (void) timeout(cpu_delayed_check_ce_errors, arg,
6075      -                    drv_usectohz((clock_t)cpu_ceen_delay_secs * MICROSEC));
     6074 +                    drv_sectohz((clock_t)cpu_ceen_delay_secs));
6076 6075          }
6077 6076  }
6078 6077  
6079 6078  /*
6080 6079   * CE Deferred Re-enable after trap.
6081 6080   *
6082 6081   * When the CPU gets a disrupting trap for any of the errors
6083 6082   * controlled by the CEEN bit, CEEN is disabled in the trap handler
6084 6083   * immediately. To eliminate the possibility of multiple CEs causing
6085 6084   * recursive stack overflow in the trap handler, we cannot
↓ open down ↓ 68 lines elided ↑ open up ↑
6154 6153                   * Keep rescheduling the timeout, accepting the additional
6155 6154                   * overhead as the cost of correctness in the case where we get
6156 6155                   * a CE, disable CEEN, offline the CPU during the
6157 6156                   * the timeout interval, and then online it at some
6158 6157                   * point in the future. This is unlikely given the short
6159 6158                   * cpu_ceen_delay_secs.
6160 6159                   */
6161 6160                  mutex_exit(&cpu_lock);
6162 6161                  (void) timeout(cpu_delayed_check_ce_errors,
6163 6162                      (void *)(uintptr_t)cp->cpu_id,
6164      -                    drv_usectohz((clock_t)cpu_ceen_delay_secs * MICROSEC));
     6163 +                    drv_sectohz((clock_t)cpu_ceen_delay_secs));
6165 6164          }
6166 6165  }
6167 6166  
6168 6167  /*
6169 6168   * This routine will check whether CEs have occurred while
6170 6169   * CEEN is disabled. Any CEs detected will be logged and, if
6171 6170   * possible, scrubbed.
6172 6171   *
6173 6172   * The memscrubber will also use this routine to clear any errors
6174 6173   * caused by its scrubbing with CEEN disabled.
↓ open down ↓ 1122 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX