Commit d05ca13b authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar

hrtimer: Correct blatantly incorrect comment

The protection of a hrtimer which runs its callback against migration to a
different CPU has nothing to do with hard interrupt context.

The protection against migration of a hrtimer running the expiry callback
is the pointer in the cpu_base which holds a pointer to the currently
running timer. This pointer is evaluated in the code which potentially
switches the timer base and makes sure it's kept on the CPU on which the
callback is running.
Reported-by: default avatarAnna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarAnna-Maria Gleixner <anna-maria@linutronix.de>
Reviewed-by: default avatarFrederic Weisbecker <frederic@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: keescook@chromium.org
Link: http://lkml.kernel.org/r/20171221104205.7269-3-anna-maria@linutronix.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent ae67bada
...@@ -1195,9 +1195,9 @@ static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base, ...@@ -1195,9 +1195,9 @@ static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base,
timer->is_rel = false; timer->is_rel = false;
/* /*
* Because we run timers from hardirq context, there is no chance * The timer is marked as running in the CPU base, so it is
* they get migrated to another cpu, therefore its safe to unlock * protected against migration to a different CPU even if the lock
* the timer base. * is dropped.
*/ */
raw_spin_unlock(&cpu_base->lock); raw_spin_unlock(&cpu_base->lock);
trace_hrtimer_expire_entry(timer, now); trace_hrtimer_expire_entry(timer, now);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment