lkml.org 
[lkml]   [2017]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2017-11-18 00:00    [W:1.599 / U:1.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site