From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752220AbdK1JYL (ORCPT ); Tue, 28 Nov 2017 04:24:11 -0500 Received: from smtpcmd0756.aruba.it ([62.149.156.56]:56673 "EHLO smtpcmd0756.aruba.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751322AbdK1JYF (ORCPT ); Tue, 28 Nov 2017 04:24:05 -0500 X-Greylist: delayed 427 seconds by postgrey-1.27 at vger.kernel.org; Tue, 28 Nov 2017 04:24:05 EST Subject: Re: [PATCH] pps: parport: use timespec64 instead of timespec To: Arnd Bergmann Cc: y2038@lists.linaro.org, linux-kernel@vger.kernel.org References: <20171127114403.2599836-1-arnd@arndb.de> From: Rodolfo Giometti Message-ID: <4da3970c-fb8a-89ac-f7f0-98d9e7df147b@enneenne.com> Date: Tue, 28 Nov 2017 10:16:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171127114403.2599836-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/11/17 12:43, Arnd Bergmann wrote: > getnstimeofday() is deprecated, so I'm converting this to use > ktime_get_real_ts64() as a safe replacement. I considered using > ktime_get_real() instead, but since the algorithm here depends > on the exact timing, I decided to introduce fewer changes > and leave the code that determines the nanoseconds since the > last seconds wrap untouched. > > It's not entirely clear to me whether we should also change the > time base to CLOCK_BOOTTIME or CLOCK_TAI. With boottime, we > would be independent of changes due to settimeofday() and only > see the speed adjustment from the upstream clock source, with > the downside of having the signal be at an arbirary offset > from the start of the UTC second signal. With CLOCK_TAI, we > would use the same offset from the UTC second as before and > still suffer from settimeofday() adjustments, but would be > less confused during leap seconds. > > Both boottime and tai only offer usable (i.e. avoiding ktime_t > to timespec64 conversion) interfaces for ktime_t though, so > either way, changing it wouldn't take significantly more work. > CLOCK_MONOTONIC could be used with ktime_get_ts64(), but would > lose synchronization across a suspend/resume cycle, which seems > worse. > > Signed-off-by: Arnd Bergmann Acked-by: Rodolfo Giometti -- HCE Engineering e-mail: giometti@hce-engineering.it GNU/Linux Solutions giometti@enneenne.com Linux Device Driver giometti@linux.it Embedded Systems phone: +39 349 2432127 UNIX programming skype: rodolfo.giometti Cosino Project - the quick prototyping embedded system - www.cosino.it Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it