Merge branch 'fortglx/3.3/tip/timers/core' of git://git.linaro.org/people/jstultz...
authorThomas Gleixner <tglx@linutronix.de>
Mon, 5 Dec 2011 21:13:49 +0000 (22:13 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 5 Dec 2011 21:13:49 +0000 (22:13 +0100)
1  2 
arch/x86/kernel/tsc.c
kernel/time/timekeeping.c

diff --combined arch/x86/kernel/tsc.c
@@@ -35,7 -35,7 +35,7 @@@ static int __read_mostly tsc_unstable
     erroneous rdtsc usage on !cpu_has_tsc processors */
  static int __read_mostly tsc_disabled = -1;
  
 -static int tsc_clocksource_reliable;
 +int tsc_clocksource_reliable;
  /*
   * Scheduler clock - returns current time in nanosec units.
   */
@@@ -178,11 -178,11 +178,11 @@@ static unsigned long calc_pmtimer_ref(u
  }
  
  #define CAL_MS                10
- #define CAL_LATCH     (CLOCK_TICK_RATE / (1000 / CAL_MS))
+ #define CAL_LATCH     (PIT_TICK_RATE / (1000 / CAL_MS))
  #define CAL_PIT_LOOPS 1000
  
  #define CAL2_MS               50
- #define CAL2_LATCH    (CLOCK_TICK_RATE / (1000 / CAL2_MS))
+ #define CAL2_LATCH    (PIT_TICK_RATE / (1000 / CAL2_MS))
  #define CAL2_PIT_LOOPS        5000
  
  
@@@ -131,7 -131,7 +131,7 @@@ static inline s64 timekeeping_get_ns_ra
        /* calculate the delta since the last update_wall_time: */
        cycle_delta = (cycle_now - clock->cycle_last) & clock->mask;
  
-       /* return delta convert to nanoseconds using ntp adjusted mult. */
+       /* return delta convert to nanoseconds. */
        return clocksource_cyc2ns(cycle_delta, clock->mult, clock->shift);
  }
  
@@@ -249,8 -249,6 +249,8 @@@ ktime_t ktime_get(void
                secs = xtime.tv_sec + wall_to_monotonic.tv_sec;
                nsecs = xtime.tv_nsec + wall_to_monotonic.tv_nsec;
                nsecs += timekeeping_get_ns();
 +              /* If arch requires, add in gettimeoffset() */
 +              nsecs += arch_gettimeoffset();
  
        } while (read_seqretry(&xtime_lock, seq));
        /*
@@@ -282,8 -280,6 +282,8 @@@ void ktime_get_ts(struct timespec *ts
                *ts = xtime;
                tomono = wall_to_monotonic;
                nsecs = timekeeping_get_ns();
 +              /* If arch requires, add in gettimeoffset() */
 +              nsecs += arch_gettimeoffset();
  
        } while (read_seqretry(&xtime_lock, seq));
  
@@@ -813,11 -809,11 +813,11 @@@ static void timekeeping_adjust(s64 offs
         * First we shift it down from NTP_SHIFT to clocksource->shifted nsecs.
         *
         * Note we subtract one in the shift, so that error is really error*2.
-        * This "saves" dividing(shifting) intererval twice, but keeps the
-        * (error > interval) comparision as still measuring if error is
+        * This "saves" dividing(shifting) interval twice, but keeps the
+        * (error > interval) comparison as still measuring if error is
         * larger then half an interval.
         *
-        * Note: It does not "save" on aggrivation when reading the code.
+        * Note: It does not "save" on aggravation when reading the code.
         */
        error = timekeeper.ntp_error >> (timekeeper.ntp_error_shift - 1);
        if (error > interval) {
                 * nanosecond, and store the amount rounded up into
                 * the error. This causes the likely below to be unlikely.
                 *
-                * The properfix is to avoid rounding up by using
+                * The proper fix is to avoid rounding up by using
                 * the high precision timekeeper.xtime_nsec instead of
                 * xtime.tv_nsec everywhere. Fixing this will take some
                 * time.