Pull cpuidle into release branch
[pandora-kernel.git] / arch / ia64 / kernel / time.c
index 627785c..2bb8421 100644 (file)
@@ -52,7 +52,7 @@ static struct clocksource clocksource_itc = {
         .name           = "itc",
         .rating         = 350,
         .read           = itc_get_cycles,
-        .mask           = 0xffffffffffffffff,
+        .mask           = CLOCKSOURCE_MASK(64),
         .mult           = 0, /*to be caluclated*/
         .shift          = 16,
         .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
@@ -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;
 
@@ -357,6 +371,11 @@ ia64_setup_printk_clock(void)
                ia64_printk_clock = ia64_itc_printk_clock;
 }
 
+/* IA64 doesn't cache the timezone */
+void update_vsyscall_tz(void)
+{
+}
+
 void update_vsyscall(struct timespec *wall, struct clocksource *c)
 {
         unsigned long flags;