[PATCH 0/24] Update clocksource registration

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Dec 13 14:14:37 EST 2010


John Stultz notes in his commit:

    clocksource: Add clocksource_register_hz/khz interface

    How to pick good mult/shift pairs has always been difficult to
    describe to folks writing clocksource drivers, since it requires
    careful tradeoffs in adjustment accuracy vs overflow limits.

    Now, with the clocks_calc_mult_shift function, its much
    easier. However, not many clocksources have converted to using that
    function, and there is still the issue of the max interval length
    assumption being made by each clocksource driver independently.

    So this patch simplifies the registration process by having
    clocksources be registered with a hz/khz value and the registration
    function taking care of setting mult/shift.

    This should take most of the confusion out of writing a clocksource
    driver.

    Additionally it also keeps the shift size tradeoff (more accuracy vs
    longer possible nohz times) centralized so the timekeeping core can
    keep track of the assumptions being made.

This patch series updates all ARM platforms clocksource registration
to use the new clocksource_register_hz()/clocksource_register_khz()
functions, simplifying the selection of the multiply/shift constants.



More information about the linux-arm-kernel mailing list