22 Feb, 2020

1 commit

  • No users remain, so kill these off before we grow new ones.

    Link: http://lkml.kernel.org/r/20200110154232.4104492-3-arnd@arndb.de
    Signed-off-by: Arnd Bergmann
    Acked-by: Thomas Gleixner
    Cc: Deepa Dinamani
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     

18 Dec, 2018

2 commits


27 Aug, 2018

2 commits

  • get_seconds() and do_gettimeofday() are only used by a few modules now any
    more (waiting for the respective patches to get accepted), and they are
    among the last holdouts of code that is not y2038 safe in the core kernel.

    Move the implementation into the timekeeping32.h header to clean up
    the core kernel and isolate the old interfaces further.

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     
  • After many small patches, at least some of the deprecated interfaces
    have no remaining users any more and can be removed:

    current_kernel_time
    do_settimeofday
    get_monotonic_boottime
    get_monotonic_boottime64
    get_monotonic_coarse
    get_monotonic_coarse64
    getrawmonotonic64
    ktime_get_real_ts
    timekeeping_clocktai
    timespec_trunc
    timespec_valid_strict
    time_to_tm

    For many of the remaining time functions, we are missing one or
    two patches that failed to make it into 4.19, they will be removed
    in the following merge window.

    The replacement functions for the removed interfaces are documented in
    Documentation/core-api/timekeeping.rst.

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

19 May, 2018

3 commits

  • The current_kernel_time64, get_monotonic_coarse64, getrawmonotonic64,
    get_monotonic_boottime64 and timekeeping_clocktai64 interfaces have
    rather inconsistent naming, and they differ in the calling conventions
    by passing the output either by reference or as a return value.

    Rename them to ktime_get_coarse_real_ts64, ktime_get_coarse_ts64,
    ktime_get_raw_ts64, ktime_get_boottime_ts64 and ktime_get_clocktai_ts64
    respectively, and provide the interfaces with macros or inline
    functions as needed.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Thomas Gleixner
    Cc: Stephen Boyd
    Cc: y2038@lists.linaro.org
    Cc: John Stultz
    Link: https://lkml.kernel.org/r/20180427134016.2525989-4-arnd@arndb.de

    Arnd Bergmann
     
  • In a move to make ktime_get_*() the preferred driver interface into the
    timekeeping code, sanitizes ktime_get_real_ts64() to be a proper exported
    symbol rather than an alias for getnstimeofday64().

    The internal __getnstimeofday64() is no longer used, so remove that
    and merge it into ktime_get_real_ts64().

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Thomas Gleixner
    Cc: Stephen Boyd
    Cc: y2038@lists.linaro.org
    Cc: John Stultz
    Link: https://lkml.kernel.org/r/20180427134016.2525989-3-arnd@arndb.de

    Arnd Bergmann
     
  • At this point, we have converted most of the kernel to use timespec64
    consistently in place of timespec, so it seems it's time to make
    timespec64 the native structure and define timespec in terms of that
    one on 64-bit architectures.

    Starting with gcc-5, the compiler can completely optimize away the
    timespec_to_timespec64 and timespec64_to_timespec functions on 64-bit
    architectures. With older compilers, we introduce a couple of extra
    copies of local variables, but those are easily avoided by using
    the timespec64 based interfaces consistently, as we do in most of the
    important code paths already.

    The main upside of removing the hack is that printing the tv_sec
    field of a timespec64 structure can now use the %lld format
    string on all architectures without a cast to time64_t. Without
    this patch, the field is a 'long' type and would have to be printed
    using %ld on 64-bit architectures.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Thomas Gleixner
    Cc: Stephen Boyd
    Cc: y2038@lists.linaro.org
    Cc: John Stultz
    Link: https://lkml.kernel.org/r/20180427134016.2525989-2-arnd@arndb.de

    Arnd Bergmann
     

17 Apr, 2018

1 commit

  • The __current_kernel_time() function based on 'struct timespec' is no
    longer recommended for new code, and the only user of this function has
    been replaced by commit 6909e29fdefb ("kdb: use __ktime_get_real_seconds
    instead of __current_kernel_time").

    Remove the obsolete interface.

    Signed-off-by: Baolin Wang
    Signed-off-by: Thomas Gleixner
    Cc: arnd@arndb.de
    Cc: sboyd@kernel.org
    Cc: broonie@kernel.org
    Cc: john.stultz@linaro.org
    Link: https://lkml.kernel.org/r/1a9dbea7ee2cda7efe9ed330874075cf17fdbff6.1523596316.git.baolin.wang@linaro.org

    Baolin Wang
     

31 Oct, 2017

1 commit

  • The interfaces based on 'struct timespec' and 'unsigned long' seconds
    are no longer recommended for new code, and we are trying to migrate to
    ktime_t based interfaces and other y2038-safe variants.

    This moves all the legacy interfaces from linux/timekeeping.h into a
    new timekeeping32.h to better document this.

    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Miroslav Lichvar
    Cc: Richard Cochran
    Cc: Prarit Bhargava
    Cc: Stephen Boyd
    Signed-off-by: Arnd Bergmann
    Signed-off-by: John Stultz

    Arnd Bergmann