diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-05-20 14:25:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-05-20 14:25:54 -0400 |
commit | b9aad92236391f681083fa4045083d5b846b59e0 (patch) | |
tree | 12c19ea09f2a2a4f592baf2892d88a077b681043 | |
parent | 441cab960d991897ec0e739dffee018bb2479c45 (diff) | |
parent | 5596fe34495cf0f645f417eb928ef224df3e3cb4 (diff) |
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
-rw-r--r-- | kernel/time/tick-broadcast.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index b398c2ea69b2..aa2094d5dd27 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c | |||
@@ -612,6 +612,14 @@ static void tick_handle_oneshot_broadcast(struct clock_event_device *dev) | |||
612 | now = ktime_get(); | 612 | now = ktime_get(); |
613 | /* Find all expired events */ | 613 | /* Find all expired events */ |
614 | for_each_cpu(cpu, tick_broadcast_oneshot_mask) { | 614 | 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 | |||
615 | td = &per_cpu(tick_cpu_device, cpu); | 623 | td = &per_cpu(tick_cpu_device, cpu); |
616 | if (td->evtdev->next_event <= now) { | 624 | if (td->evtdev->next_event <= now) { |
617 | cpumask_set_cpu(cpu, tmpmask); | 625 | cpumask_set_cpu(cpu, tmpmask); |