Skip to content

Commit

Permalink
nohz: Reset next_tick cache even when the timer has no regs
Browse files Browse the repository at this point in the history
Handle tick interrupts whose regs are NULL, out of general paranoia. It happens
when hrtimer_interrupt() is called from non-interrupt contexts, such as hotplug
CPU down events.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
fweisbec authored and Ingo Molnar committed May 30, 2017
1 parent 411fe24 commit 7c25904
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/time/tick-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,8 @@ static enum hrtimer_restart tick_sched_timer(struct hrtimer *timer)
*/
if (regs)
tick_sched_handle(ts, regs);
else
ts->next_tick = 0;

/* No need to reprogram if we are in idle or full dynticks mode */
if (unlikely(ts->tick_stopped))
Expand Down

0 comments on commit 7c25904

Please sign in to comment.