kernel_optimize_test/drivers/pps
Arnd Bergmann 28f3a488ed pps: parport: use timespec64 instead of timespec
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.

Link: http://lkml.kernel.org/r/20180116171451.3095620-1-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-02-06 18:32:46 -08:00
..
clients treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
generators pps: parport: use timespec64 instead of timespec 2018-02-06 18:32:46 -08:00
kapi.c ntp/pps: use y2038 safe types in pps_event_time 2015-10-01 09:59:16 -07:00
kc.c ntp/pps: use y2038 safe types in pps_event_time 2015-10-01 09:59:16 -07:00
kc.h
Kconfig drivers/pps: use surrounding "if PPS" to remove numerous dependency checks 2017-09-08 18:26:51 -07:00
Makefile
pps.c the rest of drivers/*: annotate ->poll() instances 2017-11-28 11:06:58 -05:00
sysfs.c