diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/hrtimer.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index fd4b13b131f8..2288fbdada16 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -721,17 +721,20 @@ static int hrtimer_switch_to_hres(void) | |||
721 | return 1; | 721 | return 1; |
722 | } | 722 | } |
723 | 723 | ||
724 | static void clock_was_set_work(struct work_struct *work) | ||
725 | { | ||
726 | clock_was_set(); | ||
727 | } | ||
728 | |||
729 | static DECLARE_WORK(hrtimer_work, clock_was_set_work); | ||
730 | |||
724 | /* | 731 | /* |
725 | * Called from timekeeping code to reprogramm the hrtimer interrupt | 732 | * Called from timekeeping and resume code to reprogramm the hrtimer |
726 | * device. If called from the timer interrupt context we defer it to | 733 | * interrupt device on all cpus. |
727 | * softirq context. | ||
728 | */ | 734 | */ |
729 | void clock_was_set_delayed(void) | 735 | void clock_was_set_delayed(void) |
730 | { | 736 | { |
731 | struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); | 737 | schedule_work(&hrtimer_work); |
732 | |||
733 | cpu_base->clock_was_set = 1; | ||
734 | __raise_softirq_irqoff(HRTIMER_SOFTIRQ); | ||
735 | } | 738 | } |
736 | 739 | ||
737 | #else | 740 | #else |
@@ -780,8 +783,10 @@ void hrtimers_resume(void) | |||
780 | WARN_ONCE(!irqs_disabled(), | 783 | WARN_ONCE(!irqs_disabled(), |
781 | KERN_INFO "hrtimers_resume() called with IRQs enabled!"); | 784 | KERN_INFO "hrtimers_resume() called with IRQs enabled!"); |
782 | 785 | ||
786 | /* Retrigger on the local CPU */ | ||
783 | retrigger_next_event(NULL); | 787 | retrigger_next_event(NULL); |
784 | timerfd_clock_was_set(); | 788 | /* And schedule a retrigger for all others */ |
789 | clock_was_set_delayed(); | ||
785 | } | 790 | } |
786 | 791 | ||
787 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) | 792 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) |
@@ -1432,13 +1437,6 @@ void hrtimer_peek_ahead_timers(void) | |||
1432 | 1437 | ||
1433 | static void run_hrtimer_softirq(struct softirq_action *h) | 1438 | static void run_hrtimer_softirq(struct softirq_action *h) |
1434 | { | 1439 | { |
1435 | struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); | ||
1436 | |||
1437 | if (cpu_base->clock_was_set) { | ||
1438 | cpu_base->clock_was_set = 0; | ||
1439 | clock_was_set(); | ||
1440 | } | ||
1441 | |||
1442 | hrtimer_peek_ahead_timers(); | 1440 | hrtimer_peek_ahead_timers(); |
1443 | } | 1441 | } |
1444 | 1442 | ||