linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / alpha / kernel / time.c
index b191cc7..6b2921b 100644 (file)
@@ -27,6 +27,7 @@
  * 2003-06-03  R. Scott Bailey <scott.bailey@eds.com>
  *     Tighten sanity in time_init from 1% (10,000 PPM) to 250 PPM
  */
+#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/module.h>
 #include <linux/sched.h>
@@ -233,7 +234,7 @@ validate_cc_value(unsigned long cc)
        index = cpu->type & 0xffffffff;
 
        /* If index out of bounds, no way to validate.  */
-       if (index >= ARRAY_SIZE(cpu_hz))
+       if (index >= sizeof(cpu_hz)/sizeof(cpu_hz[0]))
                return cc;
 
        /* If index contains no data, no way to validate.  */
@@ -313,11 +314,10 @@ time_init(void)
        if (!est_cycle_freq)
                est_cycle_freq = validate_cc_value(calibrate_cc_with_pit());
 
-       cc1 = rpcc();
+       cc1 = rpcc_after_update_in_progress();
 
        /* Calibrate CPU clock -- attempt #2.  */
        if (!est_cycle_freq) {
-               cc1 = rpcc_after_update_in_progress();
                cc2 = rpcc_after_update_in_progress();
                est_cycle_freq = validate_cc_value(cc2 - cc1);
                cc1 = cc2;