diff options
-rw-r--r-- | include/linux/hrtimer.h | 3 | ||||
-rw-r--r-- | kernel/hrtimer.c | 12 | ||||
-rw-r--r-- | kernel/timer.c | 2 |
3 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 5bdbc744e773..17c29dca8354 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -206,6 +206,7 @@ struct hrtimer_cpu_base { | |||
206 | struct clock_event_device; | 206 | struct clock_event_device; |
207 | 207 | ||
208 | extern void clock_was_set(void); | 208 | extern void clock_was_set(void); |
209 | extern void hres_timers_resume(void); | ||
209 | extern void hrtimer_interrupt(struct clock_event_device *dev); | 210 | extern void hrtimer_interrupt(struct clock_event_device *dev); |
210 | 211 | ||
211 | /* | 212 | /* |
@@ -236,6 +237,8 @@ static inline ktime_t hrtimer_cb_get_time(struct hrtimer *timer) | |||
236 | */ | 237 | */ |
237 | static inline void clock_was_set(void) { } | 238 | static inline void clock_was_set(void) { } |
238 | 239 | ||
240 | static inline void hres_timers_resume(void) { } | ||
241 | |||
239 | /* | 242 | /* |
240 | * In non high resolution mode the time reference is taken from | 243 | * In non high resolution mode the time reference is taken from |
241 | * the base softirq time variable. | 244 | * the base softirq time variable. |
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 067ba2c05328..b74860aaf5f1 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -459,6 +459,18 @@ void clock_was_set(void) | |||
459 | } | 459 | } |
460 | 460 | ||
461 | /* | 461 | /* |
462 | * During resume we might have to reprogram the high resolution timer | ||
463 | * interrupt (on the local CPU): | ||
464 | */ | ||
465 | void hres_timers_resume(void) | ||
466 | { | ||
467 | WARN_ON_ONCE(num_online_cpus() > 1); | ||
468 | |||
469 | /* Retrigger the CPU local events: */ | ||
470 | retrigger_next_event(NULL); | ||
471 | } | ||
472 | |||
473 | /* | ||
462 | * Check, whether the timer is on the callback pending list | 474 | * Check, whether the timer is on the callback pending list |
463 | */ | 475 | */ |
464 | static inline int hrtimer_cb_pending(const struct hrtimer *timer) | 476 | static inline int hrtimer_cb_pending(const struct hrtimer *timer) |
diff --git a/kernel/timer.c b/kernel/timer.c index 440048acaea1..dd6c2c1c561b 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1016,7 +1016,7 @@ static int timekeeping_resume(struct sys_device *dev) | |||
1016 | clockevents_notify(CLOCK_EVT_NOTIFY_RESUME, NULL); | 1016 | clockevents_notify(CLOCK_EVT_NOTIFY_RESUME, NULL); |
1017 | 1017 | ||
1018 | /* Resume hrtimers */ | 1018 | /* Resume hrtimers */ |
1019 | clock_was_set(); | 1019 | hres_timers_resume(); |
1020 | 1020 | ||
1021 | return 0; | 1021 | return 0; |
1022 | } | 1022 | } |