Re: [RFC PATCH 09/13] clocksource: allow usage independent of timekeeping.c

David Miller
2008-11-12T10:04:34Z

From: Patrick Ohly <patrick.ohly@intel.com>
Date: Tue, 4 Nov 2008 10:23:42 +0100

> So far struct clocksource acted as the interface between time/timekeeping
> and hardware. This patch generalizes the concept so that the same
> interface can also be used in other contexts.
>
> The only change as far as kernel/time/timekeeping is concerned is that
> the hardware access can be done either with or without passing
> the clocksource pointer as context. This is necessary in those
> cases when there is more than one instance of the hardware.
>
> The extensions in this patch add code which turns the raw cycle count
> provided by hardware into a continously increasing time value. This
> reuses fields also used by timekeeping.c. Because of slightly different
> semantic (__get_nsec_offset does not update cycle_last, clocksource_read_ns
> does that transparently) timekeeping.c was not modified to use the
> generalized code.
>
> The new code does no locking of the clocksource. This is the responsibility
> of the caller.
>
> Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>

This patch, since it changes generic facilities in the kernel rather
than networking specific ones, will need to get a full review on
linux-kernel