Skip to content

Commit 2eeefc6

Browse files
committed
Merge tag 'timers-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Ingo Molnar: "Update/fix two CPU sanity checks in the hotplug and the boot code, and fix a typo in the Kconfig help text. [ Context: the first two commits are the result of an ongoing annotation+review work of (intentional) tick_do_timer_cpu() data races reported by KCSAN, but the annotations aren't fully cooked yet ]" * tag 'timers-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timekeeping: Fix spelling mistake in Kconfig "fullfill" -> "fulfill" tick/sched: Remove bogus boot "safety" check tick: Remove pointless cpu valid check in hotplug code
2 parents 3b80dee + f6f5cd8 commit 2eeefc6

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

kernel/time/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ config CONTEXT_TRACKING_FORCE
141141
dynticks working.
142142

143143
This option stands for testing when an arch implements the
144-
context tracking backend but doesn't yet fullfill all the
144+
context tracking backend but doesn't yet fulfill all the
145145
requirements to make the full dynticks feature working.
146146
Without the full dynticks, there is no way to test the support
147147
for context tracking and the subsystems that rely on it: RCU

kernel/time/tick-common.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -407,17 +407,13 @@ EXPORT_SYMBOL_GPL(tick_broadcast_oneshot_control);
407407
/*
408408
* Transfer the do_timer job away from a dying cpu.
409409
*
410-
* Called with interrupts disabled. Not locking required. If
410+
* Called with interrupts disabled. No locking required. If
411411
* tick_do_timer_cpu is owned by this cpu, nothing can change it.
412412
*/
413413
void tick_handover_do_timer(void)
414414
{
415-
if (tick_do_timer_cpu == smp_processor_id()) {
416-
int cpu = cpumask_first(cpu_online_mask);
417-
418-
tick_do_timer_cpu = (cpu < nr_cpu_ids) ? cpu :
419-
TICK_DO_TIMER_NONE;
420-
}
415+
if (tick_do_timer_cpu == smp_processor_id())
416+
tick_do_timer_cpu = cpumask_first(cpu_online_mask);
421417
}
422418

423419
/*

kernel/time/tick-sched.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -989,13 +989,6 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
989989
*/
990990
if (tick_do_timer_cpu == cpu)
991991
return false;
992-
/*
993-
* Boot safety: make sure the timekeeping duty has been
994-
* assigned before entering dyntick-idle mode,
995-
* tick_do_timer_cpu is TICK_DO_TIMER_BOOT
996-
*/
997-
if (unlikely(tick_do_timer_cpu == TICK_DO_TIMER_BOOT))
998-
return false;
999992

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

0 commit comments

Comments
 (0)