From: Rodolfo Giometti <giometti@enneenne.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: y2038@lists.linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pps: parport: use timespec64 instead of timespec
Date: Tue, 28 Nov 2017 10:16:45 +0100 [thread overview]
Message-ID: <4da3970c-fb8a-89ac-f7f0-98d9e7df147b@enneenne.com> (raw)
In-Reply-To: <20171127114403.2599836-1-arnd@arndb.de>
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 <arnd@arndb.de>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
--
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
next prev parent reply other threads:[~2017-11-28 9:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-27 11:43 Arnd Bergmann
2017-11-28 9:16 ` Rodolfo Giometti [this message]
2018-01-16 17:14 Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4da3970c-fb8a-89ac-f7f0-98d9e7df147b@enneenne.com \
--to=giometti@enneenne.com \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=y2038@lists.linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®