Skip to content

Commit

Permalink
tick/sched: Remove bogus boot "safety" check
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
KAGA-KOKO committed Dec 16, 2020
1 parent f12ad42 commit ba8ea8e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions kernel/time/tick-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,13 +991,6 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
*/
if (tick_do_timer_cpu == cpu)
return false;
/*
* Boot safety: make sure the timekeeping duty has been
* assigned before entering dyntick-idle mode,
* tick_do_timer_cpu is TICK_DO_TIMER_BOOT
*/
if (unlikely(tick_do_timer_cpu == TICK_DO_TIMER_BOOT))
return false;

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

0 comments on commit ba8ea8e

Please sign in to comment.