Messages in this thread | | | Date | Wed, 23 Jul 2014 23:59:31 +0200 (CEST) | From | Thomas Gleixner <> | Subject | Re: [patch V2 12/64] timekeeper: Move tk_xtime to core code |
| |
On Wed, 23 Jul 2014, John Stultz wrote: > 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.
Nice catch!
Thanks,
tglx
| |