lkml.org 
[lkml]   [2014]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [patch V2 12/64] timekeeper: Move tk_xtime to core code
From
On Wed, Jul 16, 2014 at 2:04 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> Index: tip/kernel/time/timekeeping.c
> ===================================================================
> --- tip.orig/kernel/time/timekeeping.c
> +++ tip/kernel/time/timekeeping.c
> @@ -51,6 +51,15 @@ static inline void tk_normalize_xtime(st
> }
> }
>
> +static inline struct timespec64 tk_xtime(struct timekeeper *tk)
> +{
> + struct timespec64 ts;
> +
> + ts.tv_sec = tk->xtime_sec;
> + ts.tv_nsec = (long)(tk->xtime_nsec >> tk->shift);
> + return ts;
> +}
> +
> static void tk_set_xtime(struct timekeeper *tk, const struct timespec64 *ts)
> {
> tk->xtime_sec = ts->tv_sec;
> @@ -199,6 +208,40 @@ static inline s64 timekeeping_get_ns_raw
> return nsec + arch_gettimeoffset();
> }
>
> +#ifdef CONFIG_GENERIC_TIME_VSYSCALL_OLD
> +
> +static inline void update_vsyscall(struct timekeeper *tk)
> +{
> + struct timespec xt;
> +
> + xt = tk_xtime(tk);
> + update_vsyscall_old(&xt, &tk->wall_to_monotonic, tk->clock, tk->mult);
> +}

So one gotcha here, and I realized I missed this in my timekeeping
timespec64 conversion patch, is that here we're calling tk_xtime()
which returns a timespec64, and we stuff it into a timespec.

Now, the reason we didn't see the compiler gripe on this, was that the
only VSYSCALL_OLD implementations left are ia64 and ppc64.

I'll add a fixup patch to the queue to address this.

thanks
-john


\
 
 \ /
  Last update: 2014-07-24 00:01    [W:1.426 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site