]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ia64/kernel/time.c
time: fix typo in comments
[linux-2.6-omap-h63xx.git] / arch / ia64 / kernel / time.c
index 627785c48ea95e495389653b5bfdc320967247df..17fda5293c6716392d17a62bc24329e759df8415 100644 (file)
@@ -49,13 +49,13 @@ EXPORT_SYMBOL(last_cli_ip);
 #endif
 
 static struct clocksource clocksource_itc = {
-        .name           = "itc",
-        .rating         = 350,
-        .read           = itc_get_cycles,
-        .mask           = 0xffffffffffffffff,
-        .mult           = 0, /*to be caluclated*/
-        .shift          = 16,
-        .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
+       .name           = "itc",
+       .rating         = 350,
+       .read           = itc_get_cycles,
+       .mask           = CLOCKSOURCE_MASK(64),
+       .mult           = 0, /*to be calculated*/
+       .shift          = 16,
+       .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
 };
 static struct clocksource *itc_clocksource;
 
@@ -240,7 +240,21 @@ ia64_init_itm (void)
                if (!nojitter)
                        itc_jitter_data.itc_jitter = 1;
 #endif
-       }
+       } else
+               /*
+                * ITC is drifty and we have not synchronized the ITCs in smpboot.c.
+                * ITC values may fluctuate significantly between processors.
+                * Clock should not be used for hrtimers. Mark itc as only
+                * useful for boot and testing.
+                *
+                * Note that jitter compensation is off! There is no point of
+                * synchronizing ITCs since they may be large differentials
+                * that change over time.
+                *
+                * The only way to fix this would be to repeatedly sync the
+                * ITCs. Until that time we have to avoid ITC.
+                */
+               clocksource_itc.rating = 50;
 
        /* Setup the CPU local timer tick */
        ia64_cpu_local_tick();
@@ -255,7 +269,7 @@ ia64_init_itm (void)
        }
 }
 
-static cycle_t itc_get_cycles()
+static cycle_t itc_get_cycles(void)
 {
        u64 lcycle, now, ret;
 
@@ -330,31 +344,9 @@ udelay (unsigned long usecs)
 }
 EXPORT_SYMBOL(udelay);
 
-static unsigned long long ia64_itc_printk_clock(void)
-{
-       if (ia64_get_kr(IA64_KR_PER_CPU_DATA))
-               return sched_clock();
-       return 0;
-}
-
-static unsigned long long ia64_default_printk_clock(void)
-{
-       return (unsigned long long)(jiffies_64 - INITIAL_JIFFIES) *
-               (1000000000/HZ);
-}
-
-unsigned long long (*ia64_printk_clock)(void) = &ia64_default_printk_clock;
-
-unsigned long long printk_clock(void)
-{
-       return ia64_printk_clock();
-}
-
-void __init
-ia64_setup_printk_clock(void)
+/* IA64 doesn't cache the timezone */
+void update_vsyscall_tz(void)
 {
-       if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT))
-               ia64_printk_clock = ia64_itc_printk_clock;
 }
 
 void update_vsyscall(struct timespec *wall, struct clocksource *c)