X-Git-Url: http://git.onelab.eu/?p=linux-2.6.git;a=blobdiff_plain;f=arch%2Falpha%2Fkernel%2Ftime.c;fp=arch%2Falpha%2Fkernel%2Ftime.c;h=6b2921be19090c9a5a0a6a85a87f4e6d525ff258;hp=b191cc75973751d5bdfe6137596a051a1c821b13;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index b191cc759..6b2921be1 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c @@ -27,6 +27,7 @@ * 2003-06-03 R. Scott Bailey * Tighten sanity in time_init from 1% (10,000 PPM) to 250 PPM */ +#include #include #include #include @@ -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;