Re: [PATCH] backport: add ktime_get_raw_ts64() backport for < 3.19

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2018-09-23 at 15:52 +0200, Hauke Mehrtens wrote:
> On 09/20/2018 06:26 PM, Luca Coelho wrote:
> > From: Luca Coelho <luciano.coelho@xxxxxxxxx>
> > 
> > The getrawmonotonic64() function that is used by the
> > ktime_get_raw_ts64() backport was only introduced in 3.19.  To fix
> > compilation with earlier kernels, do the convertion from
> > getrawmonotonic() manually if the kernel is < 3.19.
> > 
> > Additionally, add timespec_to_timespec64() that we need for this
> > conversion (and which was only introduced in 4.15).
> > 
> > Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx>
> > ---
> >  backport/backport-include/linux/timekeeping.h | 29
> > +++++++++++++++++++
> >  1 file changed, 29 insertions(+)
> > 
> > diff --git a/backport/backport-include/linux/timekeeping.h
> > b/backport/backport-include/linux/timekeeping.h
> > index aebb00ca366b..56fca5759b8e 100644
> > --- a/backport/backport-include/linux/timekeeping.h
> > +++ b/backport/backport-include/linux/timekeeping.h
> > @@ -55,11 +55,40 @@ static inline void ktime_get_ts64(struct
> > timespec64 *ts)
> >  }
> >  #endif
> >  
> > +#if LINUX_VERSION_IS_LESS(3,19,0)
> > +/* This was introduced in 4.15, but we only need it in the
> > + * ktime_get_raw_ts64 backport() for < 3.19.
> 
> timespec_to_timespec64() was already added in 3.17, see
> https://elixir.bootlin.com/linux/v3.17.8/ident/timespec_to_timespec64

Oh, you're right.  I somehow got confused here.  I'm running some tests
and will resend a fixed version.

Thanks!

--
Luca.

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux