lkml.org 
[lkml]   [2014]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [patch 51/55] clocksource: Make delta calculation a function
From
On Fri, Jul 11, 2014 at 6:45 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> @@ -335,16 +335,15 @@ static void timekeeping_update(struct ti
> */
> static void timekeeping_forward_now(struct timekeeper *tk)
> {
> - cycle_t cycle_now, cycle_delta;
> + cycle_t cycle_now, delta;
> struct clocksource *clock;
> s64 nsec;
>
> clock = tk->clock;
> cycle_now = clock->read(clock);
> - cycle_delta = (cycle_now - clock->cycle_last) & clock->mask;
> - tk->cycle_last = clock->cycle_last = cycle_now;
> + delta = clocksource_delta(cycle_now, clock->cycle_last, clock->mask);

Errr.. Was dropping the update to tk->cycle_last and clock->cycle_last
intended? That seems broken.

thanks
-john


\
 
 \ /
  Last update: 2014-07-16 06:43    [W:0.105 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site