diff options
Diffstat (limited to 'kernel/time/tick-sched.c')
-rw-r--r-- | kernel/time/tick-sched.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index f5da526424a9..a87b0468568b 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -162,6 +162,8 @@ void tick_nohz_stop_idle(int cpu) | |||
162 | ts->idle_lastupdate = now; | 162 | ts->idle_lastupdate = now; |
163 | ts->idle_sleeptime = ktime_add(ts->idle_sleeptime, delta); | 163 | ts->idle_sleeptime = ktime_add(ts->idle_sleeptime, delta); |
164 | ts->idle_active = 0; | 164 | ts->idle_active = 0; |
165 | |||
166 | sched_clock_idle_wakeup_event(0); | ||
165 | } | 167 | } |
166 | } | 168 | } |
167 | 169 | ||
@@ -177,6 +179,7 @@ static ktime_t tick_nohz_start_idle(struct tick_sched *ts) | |||
177 | } | 179 | } |
178 | ts->idle_entrytime = now; | 180 | ts->idle_entrytime = now; |
179 | ts->idle_active = 1; | 181 | ts->idle_active = 1; |
182 | sched_clock_idle_sleep_event(); | ||
180 | return now; | 183 | return now; |
181 | } | 184 | } |
182 | 185 | ||
@@ -643,17 +646,21 @@ void tick_setup_sched_timer(void) | |||
643 | ts->nohz_mode = NOHZ_MODE_HIGHRES; | 646 | ts->nohz_mode = NOHZ_MODE_HIGHRES; |
644 | #endif | 647 | #endif |
645 | } | 648 | } |
649 | #endif /* HIGH_RES_TIMERS */ | ||
646 | 650 | ||
651 | #if defined CONFIG_NO_HZ || defined CONFIG_HIGH_RES_TIMERS | ||
647 | void tick_cancel_sched_timer(int cpu) | 652 | void tick_cancel_sched_timer(int cpu) |
648 | { | 653 | { |
649 | struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu); | 654 | struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu); |
650 | 655 | ||
656 | # ifdef CONFIG_HIGH_RES_TIMERS | ||
651 | if (ts->sched_timer.base) | 657 | if (ts->sched_timer.base) |
652 | hrtimer_cancel(&ts->sched_timer); | 658 | hrtimer_cancel(&ts->sched_timer); |
659 | # endif | ||
653 | 660 | ||
654 | ts->nohz_mode = NOHZ_MODE_INACTIVE; | 661 | ts->nohz_mode = NOHZ_MODE_INACTIVE; |
655 | } | 662 | } |
656 | #endif /* HIGH_RES_TIMERS */ | 663 | #endif |
657 | 664 | ||
658 | /** | 665 | /** |
659 | * Async notification about clocksource changes | 666 | * Async notification about clocksource changes |