Skip to content

Commit ba8ea8e

Browse files
committed
tick/sched: Remove bogus boot "safety" check
can_stop_idle_tick() checks whether the do_timer() duty has been taken over by a CPU on boot. That's silly because the boot CPU always takes over with the initial clockevent device. But even if no CPU would have installed a clockevent and taken over the duty then the question whether the tick on the current CPU can be stopped or not is moot. In that case the current CPU would have no clockevent either, so there would be nothing to keep ticking. Remove it. Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Frederic Weisbecker <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent f12ad42 commit ba8ea8e

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

kernel/time/tick-sched.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -991,13 +991,6 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
991991
*/
992992
if (tick_do_timer_cpu == cpu)
993993
return false;
994-
/*
995-
* Boot safety: make sure the timekeeping duty has been
996-
* assigned before entering dyntick-idle mode,
997-
* tick_do_timer_cpu is TICK_DO_TIMER_BOOT
998-
*/
999-
if (unlikely(tick_do_timer_cpu == TICK_DO_TIMER_BOOT))
1000-
return false;
1001994

1002995
/* Should not happen for nohz-full */
1003996
if (WARN_ON_ONCE(tick_do_timer_cpu == TICK_DO_TIMER_NONE))

0 commit comments

Comments
 (0)