[lkml]   [2009]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC][patch 1/5] move clock source related code to clocksource.c
On Tue, 21 Jul 2009 12:50:51 -0700
Daniel Walker <> wrote:

> On Tue, 2009-07-21 at 21:17 +0200, Martin Schwidefsky wrote:
> > plain text document attachment (clocksource-move.diff)
> > From: Martin Schwidefsky <>
> >
> > Move clock source related code from timekeeping.c to clocksource.c
> > where they belong. The selected clocks source "clock" is now defined
> > in clocksource.c and clocksource_init is added to set up the initial
> > clock.
> The problem is most (if not all) the code your moving is actually time
> keeping code .. The reason it seems like clocksource code is cause John
> wasn't very choosy about which structure he added variables too .. So
> really this clean up needs to be in reverse, remove all the timekeeping
> code from the clocksource code.

You are refering to the following variables, aren't you?

cycle_t cycle_interval;
u64 xtime_interval;
u32 raw_interval;
u64 xtime_nsec;
s64 error;
struct timespec raw_time;

There is a dependency between these values and the clocksource. But they
are only needed for the current active clock, so we could move them out
of the clocksource data structure and make them static variables in
timekeeping.c. I guess it would improve the code separation for
update_wall_time as well. Hmm, worth a try.

blue skies,

"Reality continues to ruin my life." - Calvin.

 \ /
  Last update: 2009-07-21 23:57    [W:0.171 / U:1.204 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site