aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorAnna-Maria Gleixner <anna-maria@linutronix.de>2017-12-21 11:41:54 +0100
committerIngo Molnar <mingo@kernel.org>2018-01-16 03:00:47 +0100
commitdd934aa8ad1fbaab3d916125c7fe42fff75aa7ff (patch)
tree7779b34d8e56e3a28b9147121fc34b518a38e4ae /init
parenthrtimer: Factor out __hrtimer_next_event_base() (diff)
downloadlinux-dev-dd934aa8ad1fbaab3d916125c7fe42fff75aa7ff.tar.xz
linux-dev-dd934aa8ad1fbaab3d916125c7fe42fff75aa7ff.zip
hrtimer: Use irqsave/irqrestore around __run_hrtimer()
__run_hrtimer() is called with the hrtimer_cpu_base.lock held and interrupts disabled. Before invoking the timer callback the base lock is dropped, but interrupts stay disabled. The upcoming support for softirq based hrtimers requires that interrupts are enabled before the timer callback is invoked. To avoid code duplication, take hrtimer_cpu_base.lock with raw_spin_lock_irqsave(flags) at the call site and hand in the flags as a parameter. So raw_spin_unlock_irqrestore() before the callback invocation will either keep interrupts disabled in interrupt context or restore to interrupt enabled state when called from softirq context. Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de> Cc: Christoph Hellwig <hch@lst.de> Cc: John Stultz <john.stultz@linaro.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: keescook@chromium.org Link: http://lkml.kernel.org/r/20171221104205.7269-26-anna-maria@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions