Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4u/io/rmclomv.c
          +++ new/usr/src/uts/sun4u/io/rmclomv.c
↓ open down ↓ 461 lines elided ↑ open up ↑
 462  462                          err = tod_ops.tod_set_watchdog_timer(0);
 463  463                  mutex_exit(&tod_lock);
 464  464                  if (err != 0)
 465  465                          printf("Hardware watchdog enabled\n");
 466  466  
 467  467                  /*
 468  468                   * Set time interval and start timesync routine.
 469  469                   * Also just this once set the Solaris clock
 470  470                   * to the RMC clock.
 471  471                   */
 472      -                timesync_interval = drv_usectohz(5*60 * MICROSEC);
      472 +                timesync_interval = drv_sectohz(5 * 60);
 473  473                  plat_timesync((void *) &attaching);
 474  474  
 475  475                  return (DDI_SUCCESS);
 476  476          case DDI_RESUME:
 477  477                  return (DDI_SUCCESS);
 478  478          default:
 479  479                  return (DDI_FAILURE);
 480  480          }
 481  481  }
 482  482  
↓ open down ↓ 2509 lines elided ↑ open up ↑
2992 2992                  /*
2993 2993                   * If the RMC is not responding, rmclomv_do_cmd() takes a
2994 2994                   * long time and eventually times out. We conclude that the
2995 2995                   * RMC is broken if it doesn't respond to a number of polls
2996 2996                   * made 60 secs apart. So that the rmclomv_do_cmd() time-out
2997 2997                   * period isn't added to our 60 second timer, make the
2998 2998                   * timeout() call before calling rmclomv_do_cmd().
2999 2999                   */
3000 3000                  if (timer_id == 0) {
3001 3001                          timer_id = timeout(rmclomv_checkrmc_wakeup, NULL,
3002      -                            60 * drv_usectohz(1000000));
     3002 +                            drv_sectohz(60));
3003 3003                  }
3004 3004  
3005 3005                  mutex_exit(&rmclomv_checkrmc_lock);
3006 3006  
3007 3007                  err = rmclomv_do_cmd(DP_GET_SYSINFO, DP_GET_SYSINFO_R,
3008 3008                      sizeof (sysinfo), NULL, (intptr_t)&sysinfo);
3009 3009                  if (err == 0) {
3010 3010                          mutex_enter(&rmclomv_state_lock);
3011 3011                          state = rmclomv_rmc_state;
3012 3012                          /* successful poll, reset fail count */
↓ open down ↓ 547 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX