lkml.org 
[lkml]   [2018]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: RESEND [PATCH v6 11/12] lib: vdso: Add support for CLOCK_BOOTTIME
    On Mon, 1 Oct 2018, Mark Salyzyn wrote:
    >
    > +static notrace int do_boottime(const struct vdso_data *vd, struct timespec *ts)
    > +{
    > + u32 seq, mult, shift;
    > + u64 nsec, cycle_last;
    > + vdso_wtm_clock_nsec_t wtm_nsec;
    > +
    > + /* open coding timespec_add_ns to save a ts->tv_nsec = 0 */
    > + ts->tv_sec = sec + __iter_div_u64_rem(nsec, NSEC_PER_SEC, &nsec);
    > + ts->tv_nsec = nsec;
    > +
    > + return 0;
    > +}
    > +

    Instead of adding yet another copy of the same code you might want to look
    at the rework I did for the x86 vdso in order to support CLOCK_TAI w/o
    running into the issue of the clock switch case being compiled into a jump
    table and then the compile asking for retpoline.

    http://lkml.kernel.org/r/20180917124533.329334911@linutronix.de

    Thanks,

    tglx

    \
     
     \ /
      Last update: 2018-10-01 20:16    [W:5.424 / U:0.156 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site