24 Jul, 2014

3 commits

  • The only user of the cycle_last validation is the x86 TSC. In order to
    provide NMI safe accessor functions for clock monotonic and
    monotonic_raw we need to do that in the core.

    We can't do the TSC specific

    if (now < cycle_last)
    now = cycle_last;

    for the other wrapping around clocksources, but TSC has
    CLOCKSOURCE_MASK(64) which actually does not mask out anything so if
    now is less than cycle_last the subtraction will give a negative
    result. So we can check for that in clocksource_delta() and return 0
    for that case.

    Implement and enable it for x86

    Signed-off-by: Thomas Gleixner
    Signed-off-by: John Stultz

    Thomas Gleixner
     
  • We want to move the TSC sanity check into core code to make NMI safe
    accessors to clock monotonic[_raw] possible. For this we need to
    sanity check the delta calculation. Create a helper function and
    convert all sites to use it.

    [ Build fix from jstultz ]

    Signed-off-by: Thomas Gleixner
    Signed-off-by: John Stultz

    Thomas Gleixner
     
  • Convert the core timekeeping logic to use timespec64s. This moves the
    2038 issues out of the core logic and into all of the accessor
    functions.

    Future changes will need to push the timespec64s out to all
    timekeeping users, but that can be done interface by interface.

    Signed-off-by: John Stultz
    Signed-off-by: Thomas Gleixner
    Signed-off-by: John Stultz

    John Stultz
     

30 May, 2013

1 commit

  • Below is a patch from android kernel that maintains a histogram of
    suspend times. Please review and provide feedback.

    Statistices on the time spent in suspend are kept in
    /sys/kernel/debug/sleep_time.

    Cc: Android Kernel Team
    Cc: Colin Cross
    Cc: Todd Poynor
    Cc: San Mehat
    Cc: Benoit Goby
    Cc: John Stultz
    Cc: Thomas Gleixner
    Signed-off-by: Colin Cross
    Signed-off-by: Todd Poynor
    [zoran.markovic@linaro.org: Re-formatted suspend time table to better
    fit expected values. Moved accounting of suspend time into timekeeping
    core. Removed CONFIG_SUSPEND_TIME flag and made the feature conditional
    on CONFIG_DEBUG_FS. Changed the file name to sleep_time to better fit
    terminology in timekeeping core. Changed seq_printf to seq_puts. Tweaked
    commit message]
    Signed-off-by: Zoran Markovic
    Signed-off-by: John Stultz

    Colin Cross