mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
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
This commit is contained in:
commit
b9aad92236
@ -612,6 +612,14 @@ static void tick_handle_oneshot_broadcast(struct clock_event_device *dev)
|
|||||||
now = ktime_get();
|
now = ktime_get();
|
||||||
/* Find all expired events */
|
/* Find all expired events */
|
||||||
for_each_cpu(cpu, tick_broadcast_oneshot_mask) {
|
for_each_cpu(cpu, tick_broadcast_oneshot_mask) {
|
||||||
|
/*
|
||||||
|
* Required for !SMP because for_each_cpu() reports
|
||||||
|
* unconditionally CPU0 as set on UP kernels.
|
||||||
|
*/
|
||||||
|
if (!IS_ENABLED(CONFIG_SMP) &&
|
||||||
|
cpumask_empty(tick_broadcast_oneshot_mask))
|
||||||
|
break;
|
||||||
|
|
||||||
td = &per_cpu(tick_cpu_device, cpu);
|
td = &per_cpu(tick_cpu_device, cpu);
|
||||||
if (td->evtdev->next_event <= now) {
|
if (td->evtdev->next_event <= now) {
|
||||||
cpumask_set_cpu(cpu, tmpmask);
|
cpumask_set_cpu(cpu, tmpmask);
|
||||||
|
Loading…
Reference in New Issue
Block a user