[lkml]   [2017]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] pps: parport: use timespec64 instead of timespec
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:
GNU/Linux Solutions
Linux Device Driver
Embedded Systems phone: +39 349 2432127
UNIX programming skype: rodolfo.giometti
Cosino Project - the quick prototyping embedded system -
Freelance ICT Italia - Consulente ICT Italia -

 \ /
  Last update: 2017-11-28 10:25    [W:0.041 / U:1.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site