s390/time: steer clocksource on STP sync events
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 11 Oct 2016 10:49:50 +0000 (12:49 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 28 Oct 2016 08:09:02 +0000 (10:09 +0200)
commit75c7b6f3f6bab0432353caf634598dbdba0d6e74
treee3f6cd5d3df07a9e9f831759f8270dc3cab481ca
parent2ace06ec0d997c4332582dbbb8b5e747d22c4400
s390/time: steer clocksource on STP sync events

On STP sync events the TOD clock will jump in time, either forward or
backward. The TOD clocksource claims to be continuous but in case of
an STP sync with a negative offset it is not.

Subtract the offset injected by the STP sync check from the result of
the TOD clocksource to make it continuous again. Add code to drift the
offset towards zero with a fixed rate, steering 1 second in ~9 hours.

Suggested-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/vdso.h
arch/s390/kernel/asm-offsets.c
arch/s390/kernel/time.c
arch/s390/kernel/vdso32/clock_gettime.S
arch/s390/kernel/vdso32/gettimeofday.S
arch/s390/kernel/vdso64/clock_gettime.S
arch/s390/kernel/vdso64/gettimeofday.S