|
|
Subscribe / Log in / New account

timekeeping: API cleanup and extensions

From:  Arnd Bergmann <arnd-AT-arndb.de>
To:  Thomas Gleixner <tglx-AT-linutronix.de>
Subject:  [PATCH 0/5] timekeeping: API cleanup and extensions
Date:  Fri, 27 Apr 2018 15:40:11 +0200
Message-ID:  <20180427134016.2525989-1-arnd@arndb.de>
Cc:  linux-kernel-AT-vger.kernel.org, Stephen Boyd <sboyd-AT-kernel.org>, John Stultz <john.stultz-AT-linaro.org>, y2038-AT-lists.linaro.org, Arnd Bergmann <arnd-AT-arndb.de>
Archive-link:  Article

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(-)

-- 
2.9.0



Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds