[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <op.yauhpruq1774gr@chall-mobl2.amr.corp.intel.com>
Date: Wed, 06 Jan 2016 17:42:53 -0800
From: "Christopher Hall" <christopher.s.hall@...el.com>
To: "Richard Cochran" <richardcochran@...il.com>
Cc: tglx@...utronix.de, mingo@...hat.com, john.stultz@...aro.org,
hpa@...or.com, jeffrey.t.kirsher@...el.com, x86@...nel.org,
linux-kernel@...r.kernel.org, intel-wired-lan@...ts.osuosl.org,
netdev@...r.kernel.org, kevin.b.stanton@...el.com
Subject: Re: [RFC v5 5/6] Add PTP_SYS_OFFSET_PRECISE for driver
crosstimestamping
Hi Richard,
This all sounds fine. Thanks for the feedback. I'll roll this into the
next patchset.
Chris
On Tue, 05 Jan 2016 07:27:32 -0800, Richard Cochran
<richardcochran@...il.com> wrote:
> On Mon, Jan 04, 2016 at 04:45:22AM -0800, Christopher S. Hall wrote:
>> + case PTP_SYS_OFFSET_PRECISE:
>> + if (!ptp->info->getsynctime) {
>> + err = -EINVAL;
>
> -EOPNOTSUPP would be better here.
>
>> + precise_offset.sys_real.sec =
>> + div_u64_rem(ktime_to_ns(xtstamp.sys_realtime),
>> + NSEC_PER_SEC, &rem);
>> + precise_offset.sys_real.nsec = rem;
>
> How about this instead:
>
> ts = ktime_to_timespec64(xtstamp.sys_realtime);
> precise_offset.sys_real.sec = ts.tv_sec;
> precise_offset.sys_real.nsec = ts.tv_nsec;
>
>> + precise_offset.sys_raw.sec =
>> + div_u64_rem(ktime_to_ns(xtstamp.sys_monoraw),
>> + NSEC_PER_SEC, &rem);
>> + precise_offset.sys_raw.nsec = rem;
>> + precise_offset.dev.sec =
>> + div_u64_rem(ktime_to_ns(xtstamp.device), NSEC_PER_SEC,
>> + &rem);
>> + precise_offset.dev.nsec = rem;
>
> And for these as well.
>
> Thanks,
> Richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists