mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 05:16:53 +07:00
[S390] Cleanup xtime usage
This replaces direct xtime usage in the s390 arch with timekeeping accessors, so we can further clean up the timekeeping core. Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: John Stultz <johnstul@us.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
bd6e8a162e
commit
b1e2ba8da9
@ -73,15 +73,15 @@ unsigned long long monotonic_clock(void)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(monotonic_clock);
|
EXPORT_SYMBOL(monotonic_clock);
|
||||||
|
|
||||||
void tod_to_timeval(__u64 todval, struct timespec *xtime)
|
void tod_to_timeval(__u64 todval, struct timespec *xt)
|
||||||
{
|
{
|
||||||
unsigned long long sec;
|
unsigned long long sec;
|
||||||
|
|
||||||
sec = todval >> 12;
|
sec = todval >> 12;
|
||||||
do_div(sec, 1000000);
|
do_div(sec, 1000000);
|
||||||
xtime->tv_sec = sec;
|
xt->tv_sec = sec;
|
||||||
todval -= (sec * 1000000) << 12;
|
todval -= (sec * 1000000) << 12;
|
||||||
xtime->tv_nsec = ((todval * 1000) >> 12);
|
xt->tv_nsec = ((todval * 1000) >> 12);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(tod_to_timeval);
|
EXPORT_SYMBOL(tod_to_timeval);
|
||||||
|
|
||||||
@ -216,8 +216,8 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock,
|
|||||||
++vdso_data->tb_update_count;
|
++vdso_data->tb_update_count;
|
||||||
smp_wmb();
|
smp_wmb();
|
||||||
vdso_data->xtime_tod_stamp = clock->cycle_last;
|
vdso_data->xtime_tod_stamp = clock->cycle_last;
|
||||||
vdso_data->xtime_clock_sec = xtime.tv_sec;
|
vdso_data->xtime_clock_sec = wall_time->tv_sec;
|
||||||
vdso_data->xtime_clock_nsec = xtime.tv_nsec;
|
vdso_data->xtime_clock_nsec = wall_time->tv_nsec;
|
||||||
vdso_data->wtom_clock_sec = wall_to_monotonic.tv_sec;
|
vdso_data->wtom_clock_sec = wall_to_monotonic.tv_sec;
|
||||||
vdso_data->wtom_clock_nsec = wall_to_monotonic.tv_nsec;
|
vdso_data->wtom_clock_nsec = wall_to_monotonic.tv_nsec;
|
||||||
smp_wmb();
|
smp_wmb();
|
||||||
|
Loading…
Reference in New Issue
Block a user