aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/tick-sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/time/tick-sched.c')
-rw-r--r--kernel/time/tick-sched.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 825b4c00fe44..7a46bde78c66 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -289,7 +289,6 @@ void tick_nohz_stop_sched_tick(int inidle)
289 ts->tick_stopped = 1; 289 ts->tick_stopped = 1;
290 ts->idle_jiffies = last_jiffies; 290 ts->idle_jiffies = last_jiffies;
291 rcu_enter_nohz(); 291 rcu_enter_nohz();
292 sched_clock_tick_stop(cpu);
293 } 292 }
294 293
295 /* 294 /*
@@ -392,7 +391,6 @@ void tick_nohz_restart_sched_tick(void)
392 select_nohz_load_balancer(0); 391 select_nohz_load_balancer(0);
393 now = ktime_get(); 392 now = ktime_get();
394 tick_do_update_jiffies64(now); 393 tick_do_update_jiffies64(now);
395 sched_clock_tick_start(cpu);
396 cpu_clear(cpu, nohz_cpu_mask); 394 cpu_clear(cpu, nohz_cpu_mask);
397 395
398 /* 396 /*
@@ -645,17 +643,21 @@ void tick_setup_sched_timer(void)
645 ts->nohz_mode = NOHZ_MODE_HIGHRES; 643 ts->nohz_mode = NOHZ_MODE_HIGHRES;
646#endif 644#endif
647} 645}
646#endif /* HIGH_RES_TIMERS */
648 647
648#if defined CONFIG_NO_HZ || defined CONFIG_HIGH_RES_TIMERS
649void tick_cancel_sched_timer(int cpu) 649void tick_cancel_sched_timer(int cpu)
650{ 650{
651 struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu); 651 struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu);
652 652
653# ifdef CONFIG_HIGH_RES_TIMERS
653 if (ts->sched_timer.base) 654 if (ts->sched_timer.base)
654 hrtimer_cancel(&ts->sched_timer); 655 hrtimer_cancel(&ts->sched_timer);
656# endif
655 657
656 ts->nohz_mode = NOHZ_MODE_INACTIVE; 658 ts->nohz_mode = NOHZ_MODE_INACTIVE;
657} 659}
658#endif /* HIGH_RES_TIMERS */ 660#endif
659 661
660/** 662/**
661 * Async notification about clocksource changes 663 * Async notification about clocksource changes