Messages in this thread | | | Date | Fri, 17 Nov 2017 18:00:34 -0500 | From | Steven Rostedt <> | Subject | Re: [RFC patch 4/7] timekeeping: Add NMI safe accessor to mono/boot/real clocks |
| |
On Wed, 15 Nov 2017 19:15:35 +0100 Thomas Gleixner <tglx@linutronix.de> wrote:
> +static notrace u64 __ktime_get_real_fast(struct tk_fast *tkf, u64 *mono) > { > struct tk_read_base *tkr; > + u64 basem, baser, delta; > unsigned int seq; > - u64 now; > > do { > seq = raw_read_seqcount_latch(&tkf->seq); > tkr = tkf->base + (seq & 0x01); > - now = ktime_to_ns(tkr->base_real); > + basem = ktime_to_ns(tkr->base); > + baser = ktime_to_ns(tkr->base_real); > > - now += timekeeping_delta_to_ns(tkr, > - clocksource_delta( > - tk_clock_read(tkr), > - tkr->cycle_last, > - tkr->mask)); > + delta = timekeeping_delta_to_ns(tkr, > + clocksource_delta(tk_clock_read(tkr), > + tkr->cycle_last, tkr->mask));
Could you indent this better. It looks like timekeeping_delta_to_ns() takes 4 arguments, when it really only takes two.
delta = timekeeping_dela_to_ns(tkr, clocksource_delta(tk_clock_read(tkr), tkr->cycle_last, tkr->mask));
Would point out, at least, that it takes two arguments, and clocksource_delta() takes three (not one).
-- Steve
| |