lkml.org 
[lkml]   [2021]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] include: linux: Reorganize timekeeping and ktime headers
On Thu, Jul 15, 2021 at 6:12 PM Carlos Bilbao <bilbao@vt.edu> wrote:
>
> Reorganize and separate the headers by making ktime.h take care of the
> ktime_get() family of functions, and reserve timekeeping.h for the actual
> timekeeping. This also helps to avoid implicit function errors and strengthens
> the header dependencies, since timekeeping.h was using ktime_to_ns(), a static
> function defined in a header it does no include, ktime.h. This patch also
> includes the header timekeeping.h wherever it is necessary for a successful
> compilation after the header code reorganization.
>
> Signed-off-by: Carlos Bilbao <bilbao@vt.edu>
> ---
> arch/x86/kernel/tsc.c | 1 +
> include/linux/ktime.h | 196 +++++++++++++++++++++++++++++++++++-
> include/linux/sched_clock.h | 2 +
> include/linux/timekeeping.h | 196 +-----------------------------------
> init/main.c | 1 +
> kernel/time/ntp.c | 1 +
> kernel/time/time.c | 1 +
> kernel/time/timekeeping.c | 1 +
> 8 files changed, 202 insertions(+), 197 deletions(-)

This looks reasonable overall. I'm not sure if Thomas has other plans for this
header, as he created the timekeeping.h one originally. There is also the
potential for build regressions when additional files depend on timekeeping.h
but don't include it directly. Hopefully the kbuild bot will warn us about
any of those.

Arnd

\
 
 \ /
  Last update: 2021-07-15 21:10    [W:0.068 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site