diff options
Diffstat (limited to 'kernel/time/timekeeping.c')
| -rw-r--r-- | kernel/time/timekeeping.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 8e6a05a5915a..342408cf68dd 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
| @@ -680,7 +680,7 @@ static void timekeeping_resume(void) | |||
| 680 | clockevents_notify(CLOCK_EVT_NOTIFY_RESUME, NULL); | 680 | clockevents_notify(CLOCK_EVT_NOTIFY_RESUME, NULL); |
| 681 | 681 | ||
| 682 | /* Resume hrtimers */ | 682 | /* Resume hrtimers */ |
| 683 | hres_timers_resume(); | 683 | hrtimers_resume(); |
| 684 | } | 684 | } |
| 685 | 685 | ||
| 686 | static int timekeeping_suspend(void) | 686 | static int timekeeping_suspend(void) |
| @@ -1099,6 +1099,21 @@ void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim, | |||
| 1099 | } | 1099 | } |
| 1100 | 1100 | ||
| 1101 | /** | 1101 | /** |
| 1102 | * ktime_get_monotonic_offset() - get wall_to_monotonic in ktime_t format | ||
| 1103 | */ | ||
| 1104 | ktime_t ktime_get_monotonic_offset(void) | ||
| 1105 | { | ||
| 1106 | unsigned long seq; | ||
| 1107 | struct timespec wtom; | ||
| 1108 | |||
| 1109 | do { | ||
| 1110 | seq = read_seqbegin(&xtime_lock); | ||
| 1111 | wtom = wall_to_monotonic; | ||
| 1112 | } while (read_seqretry(&xtime_lock, seq)); | ||
| 1113 | return timespec_to_ktime(wtom); | ||
| 1114 | } | ||
| 1115 | |||
| 1116 | /** | ||
| 1102 | * xtime_update() - advances the timekeeping infrastructure | 1117 | * xtime_update() - advances the timekeeping infrastructure |
| 1103 | * @ticks: number of ticks, that have elapsed since the last call. | 1118 | * @ticks: number of ticks, that have elapsed since the last call. |
| 1104 | * | 1119 | * |
