diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-05-31 07:09:57 (GMT) |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-06-13 13:58:19 (GMT) |
commit | 2f82f57763d97700788cf228de1cf30ffd4153b4 (patch) | |
tree | 39cacadec4bc9203b539c60f815f4c2f77b92a1b /drivers | |
parent | 4e042af463f806b6ef0e44048eba0964f0a5694e (diff) | |
download | linux-2f82f57763d97700788cf228de1cf30ffd4153b4.tar.xz |
s390/time: STP sync clock correction
The sync clock operation of the channel subsystem call for STP delivers
the TOD clock difference as a result. Use this TOD clock difference
instead of the difference between the TOD timestamps before and after
the sync clock operation.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/cio/chsc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index c424c0c..452193f7 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c @@ -1176,7 +1176,7 @@ exit: EXPORT_SYMBOL_GPL(css_general_characteristics); EXPORT_SYMBOL_GPL(css_chsc_characteristics); -int chsc_sstpc(void *page, unsigned int op, u16 ctrl) +int chsc_sstpc(void *page, unsigned int op, u16 ctrl, u64 *clock_delta) { struct { struct chsc_header request; @@ -1186,7 +1186,9 @@ int chsc_sstpc(void *page, unsigned int op, u16 ctrl) unsigned int ctrl : 16; unsigned int rsvd2[5]; struct chsc_header response; - unsigned int rsvd3[7]; + unsigned int rsvd3[3]; + u64 clock_delta; + unsigned int rsvd4[2]; } __attribute__ ((packed)) *rr; int rc; @@ -1200,6 +1202,8 @@ int chsc_sstpc(void *page, unsigned int op, u16 ctrl) if (rc) return -EIO; rc = (rr->response.code == 0x0001) ? 0 : -EIO; + if (clock_delta) + *clock_delta = rr->clock_delta; return rc; } |