linux-stable/arch/s390/lib
Martin Schwidefsky 6e2ef5e4f6 s390/time: add support for the TOD clock epoch extension
The TOD epoch extension adds 8 epoch bits to the TOD clock to provide
a continuous clock after 2042/09/17. The store-clock-extended (STCKE)
instruction will store the epoch index in the first byte of the
16 bytes stored by the instruction. The read_boot_clock64 and the
read_presistent_clock64 functions need to take the additional bits
into account to give the correct result after 2042/09/17.

The clock-comparator register will stay 64 bit wide. The comparison
of the clock-comparator with the TOD clock is limited to bytes
1 to 8 of the extended TOD format. To deal with the overflow problem
due to an epoch change the clock-comparator sign control in CR0 can
be used to switch the comparison of the 64-bit TOD clock with the
clock-comparator to a signed comparison.

The decision between the signed vs. unsigned clock-comparator
comparisons is done at boot time. Only if the TOD clock is in the
second half of a 142 year epoch the signed comparison is used.
This solves the epoch overflow issue as long as the machine is
booted at least once in an epoch.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2017-07-26 08:25:14 +02:00
..
delay.c s390/time: add support for the TOD clock epoch extension 2017-07-26 08:25:14 +02:00
find.c s390/bitops: remove 31 bit related comments 2015-10-14 14:32:15 +02:00
Makefile s390/xor: optimized xor routing using the XC instruction 2016-02-23 08:56:17 +01:00
mem.S s390/lib: improve memmove, memset and memcpy 2017-01-16 07:27:51 +01:00
probes.c s390/uprobes: fix compile for !KPROBES 2017-05-03 09:08:57 +02:00
spinlock.c s390/spinlock: remove compare and delay instruction 2017-04-12 08:43:33 +02:00
string.c s390: Audit and remove any remaining unnecessary uses of module.h 2017-02-17 07:40:41 +01:00
uaccess.c s390/uaccess: use sane length for __strncpy_from_user() 2017-05-09 10:43:24 +02:00
xor.c s390: Audit and remove any remaining unnecessary uses of module.h 2017-02-17 07:40:41 +01:00