|
@@ -249,6 +249,8 @@ ktime_t ktime_get(void)
|
|
|
secs = xtime.tv_sec + wall_to_monotonic.tv_sec;
|
|
|
nsecs = xtime.tv_nsec + wall_to_monotonic.tv_nsec;
|
|
|
nsecs += timekeeping_get_ns();
|
|
|
+ /* If arch requires, add in gettimeoffset() */
|
|
|
+ nsecs += arch_gettimeoffset();
|
|
|
|
|
|
} while (read_seqretry(&xtime_lock, seq));
|
|
|
/*
|
|
@@ -280,6 +282,8 @@ void ktime_get_ts(struct timespec *ts)
|
|
|
*ts = xtime;
|
|
|
tomono = wall_to_monotonic;
|
|
|
nsecs = timekeeping_get_ns();
|
|
|
+ /* If arch requires, add in gettimeoffset() */
|
|
|
+ nsecs += arch_gettimeoffset();
|
|
|
|
|
|
} while (read_seqretry(&xtime_lock, seq));
|
|
|
|