Skip to content

timekeeping: API cleanup and extensions

Arnd Bergmann lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5timekeeping: Remove timespec64 hackinclude/linux/time32.h include/linux/time64.h include/linux/timekeeping32.h +1 more+3 -691 reply
2/5timekeeping: Clean up ktime_get_real_ts64include/linux/timekeeping.h include/linux/timekeeping32.h kernel/time/timekeeping.c+13 -390 replies
3/5timekeeping: Standardize on ktime_get_*() naminginclude/linux/timekeeping.h include/linux/timekeeping32.h kernel/time/timekeeping.c+51 -290 replies
4/5timekeeping: Add ktime_get_coarse_with_offsetinclude/linux/timekeeping.h kernel/time/timekeeping.c+35 -00 replies
5/5timekeeping: Add more coarse clocktai/boottime interfacesinclude/linux/timekeeping.h+23 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] timekeeping: API cleanup and extensions

Hi Thomas,

I've had these patches for a while but never got around to submitting them. I recently rebased them after the boot time removal and now again after the revert.

I'd like to see these go into v4.18 as a preparation for a last set of driver conversions to y2038-safe interfaces that I've held off for now since the interfaces were suboptimal.

The problems solved by this series are:
- aliasing timespec to timespec64 is a little erorr-prone, and in particular requires ugly casts to print a tv_sec field using the same format string across architectures

- naming is inconsistent, and while converting from the deprecated time_t to something else, I'd like to also convert to a ktime_get_*() API for consistency

- drivers that use current_kernel_time() today often care about the call being fast but don't care about it being CLOCK_REALTIME based, so they are better off being changed to a CLOCK_MONOTONIC or CLOCK_BOOTTIME based accessor to avoid issues with time going backwards.

Arnd

Arnd Bergmann (5):
timekeeping: Remove timespec64 hack
timekeeping: Clean up ktime_get_real_ts64
timekeeping: Standardize on ktime_get_*() naming
timekeeping: Add ktime_get_coarse_with_offset
timekeeping: Add more coarse clocktai/boottime interfaces

 include/linux/time32.h        | 18 ++-------
 include/linux/time64.h        |  7 ----
 include/linux/timekeeping.h   | 91 ++++++++++++++++++++++++++++++++++++-------
 include/linux/timekeeping32.h | 70 ++++++---------------------------
 kernel/time/time.c            |  2 -
 kernel/time/timekeeping.c     | 73 ++++++++++++++++------------------
 6 files changed, 124 insertions(+), 137 deletions(-)
Signature · 1 line
2.9.0