s390: time: Provide read_boot_clock64() and read_persistent_clock64()
As part of addressing the "y2038 problem" for in-kernel uses, this patch converts read_boot_clock() to read_boot_clock64() and read_persistent_clock() to read_persistent_clock64() using timespec64. Rename some instances of 'timespec' to 'timespec64' in time.c and related references Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: linux390@de.ibm.com Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org> [jstultz: Fixed minor style and grammer tweaks pointed out by Ingo] Signed-off-by: John Stultz <john.stultz@linaro.org>
This commit is contained in:
@@ -76,7 +76,7 @@ unsigned long long monotonic_clock(void)
|
||||
}
|
||||
EXPORT_SYMBOL(monotonic_clock);
|
||||
|
||||
void tod_to_timeval(__u64 todval, struct timespec *xt)
|
||||
void tod_to_timeval(__u64 todval, struct timespec64 *xt)
|
||||
{
|
||||
unsigned long long sec;
|
||||
|
||||
@@ -181,12 +181,12 @@ static void timing_alert_interrupt(struct ext_code ext_code,
|
||||
static void etr_reset(void);
|
||||
static void stp_reset(void);
|
||||
|
||||
void read_persistent_clock(struct timespec *ts)
|
||||
void read_persistent_clock64(struct timespec64 *ts)
|
||||
{
|
||||
tod_to_timeval(get_tod_clock() - TOD_UNIX_EPOCH, ts);
|
||||
}
|
||||
|
||||
void read_boot_clock(struct timespec *ts)
|
||||
void read_boot_clock64(struct timespec64 *ts)
|
||||
{
|
||||
tod_to_timeval(sched_clock_base_cc - TOD_UNIX_EPOCH, ts);
|
||||
}
|
||||
|
Reference in New Issue
Block a user