summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/stp.h
diff options
context:
space:
mode:
authorSven Schnelle <svens@linux.ibm.com>2020-06-12 13:59:19 +0300
committerVasily Gorbik <gor@linux.ibm.com>2020-09-26 16:51:21 +0300
commitb2539aa0d7ff1e42c74a9dd8c73ec1c2771c9e5d (patch)
tree74471364f8829eba85a20ca628d944b5b50ae864 /arch/s390/include/asm/stp.h
parent4ab79ed223d2ff32ffe16cfd841e064199341c34 (diff)
downloadlinux-b2539aa0d7ff1e42c74a9dd8c73ec1c2771c9e5d.tar.xz
s390/stp: add support for leap seconds
In the current implementation, leap seconds are only synchronized during the bootup process when the STP clock is synced. If the Leap second offset (LSO) changes the machine must be rebooted, which is not desired. This patch adds the required code to handle Leap second changes during runtime. If the Leap second changes, a Configuration change machine check is triggered. The STP code than schedules a Leap second insertion/deletion with do_adjtimex(). Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/stp.h')
-rw-r--r--arch/s390/include/asm/stp.h46
1 files changed, 45 insertions, 1 deletions
diff --git a/arch/s390/include/asm/stp.h b/arch/s390/include/asm/stp.h
index a5c0bc1e5b90..ba07463897c1 100644
--- a/arch/s390/include/asm/stp.h
+++ b/arch/s390/include/asm/stp.h
@@ -25,7 +25,9 @@ struct stp_irq_parm {
struct stp_sstpi {
u32 : 32;
- u32 : 8;
+ u32 tu : 1;
+ u32 lu : 1;
+ u32 : 6;
u32 stratum : 8;
u32 vbits : 16;
u32 leaps : 16;
@@ -46,6 +48,48 @@ struct stp_sstpi {
u32 rsvd[48];
} __packed;
+struct stp_tzib {
+ u32 tzan : 16;
+ u32 : 16;
+ u32 tzo : 16;
+ u32 dsto : 16;
+ u32 stn;
+ u32 dstn;
+ u64 dst_on_alg;
+ u64 dst_off_alg;
+} __packed;
+
+struct stp_tcpib {
+ u32 atcode : 4;
+ u32 ntcode : 4;
+ u32 d : 1;
+ u32 : 23;
+ s32 tto;
+ struct stp_tzib atzib;
+ struct stp_tzib ntzib;
+ s32 adst_offset : 16;
+ s32 ndst_offset : 16;
+ u32 rsvd1;
+ u64 ntzib_update;
+ u64 ndsto_update;
+} __packed;
+
+struct stp_lsoib {
+ u32 p : 1;
+ u32 : 31;
+ s32 also : 16;
+ s32 nlso : 16;
+ u64 nlsout;
+} __packed;
+
+struct stp_stzi {
+ u32 rsvd0[3];
+ u64 data_ts;
+ u32 rsvd1[22];
+ struct stp_tcpib tcpib;
+ struct stp_lsoib lsoib;
+} __packed;
+
/* Functions needed by the machine check handler */
int stp_sync_check(void);
int stp_island_check(void);