From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [patch 4/5] PTP: add PTP_SYS_OFFSET emulation via cross timestamps infrastructure Date: Fri, 20 Jan 2017 11:07:15 -0200 Message-ID: <20170120130711.GA27440@amt.cnet> References: <20170120122025.665985919@redhat.com> <20170120122503.746158230@redhat.com> <48bb2650-ed00-ec07-31bf-8780d3ab5568@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Radim Krcmar , Richard Cochran , Miroslav Lichvar To: Paolo Bonzini Return-path: Content-Disposition: inline In-Reply-To: <48bb2650-ed00-ec07-31bf-8780d3ab5568@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Fri, Jan 20, 2017 at 01:55:27PM +0100, Paolo Bonzini wrote: > > > On 20/01/2017 13:20, Marcelo Tosatti wrote: > > kernel/time/timekeeping.c | 79 +++++++++++++++++++++++++++++++++++++++ > > Why not leave this in drivers/ptp/ptp_chardev.c? timekeeper_lock > > + if (ptp->info->emulate_ptp_sys_offset_mean) { > > + err = emulate_ptp_sys_offset(ptp->info, sysoff, arg); > > + break; > > + } > > I think this should be simply "if (!ptp->info->gettime64)" and, > likewise, there should be an emulation based getcrosststamp in > ptp_clock_gettime. > > Paolo gettime64 is called directly via ptp_clock_gettime.