Skip to content

Commit b9aad92

Browse files
committed
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull UP timer fix from Thomas Gleixner: "Work around the for_each_cpu() oddity on UP kernels in the tick broadcast code which causes boot failures because the CPU0 bit is always reported as set independent of the cpumask content" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tick/broadcast: Use for_each_cpu() specially on UP kernels
2 parents 441cab9 + 5596fe3 commit b9aad92

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

kernel/time/tick-broadcast.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,14 @@ static void tick_handle_oneshot_broadcast(struct clock_event_device *dev)
612612
now = ktime_get();
613613
/* Find all expired events */
614614
for_each_cpu(cpu, tick_broadcast_oneshot_mask) {
615+
/*
616+
* Required for !SMP because for_each_cpu() reports
617+
* unconditionally CPU0 as set on UP kernels.
618+
*/
619+
if (!IS_ENABLED(CONFIG_SMP) &&
620+
cpumask_empty(tick_broadcast_oneshot_mask))
621+
break;
622+
615623
td = &per_cpu(tick_cpu_device, cpu);
616624
if (td->evtdev->next_event <= now) {
617625
cpumask_set_cpu(cpu, tmpmask);

0 commit comments

Comments
 (0)