lockdep: Add hrtimer context tracing bits
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Sat, 21 Mar 2020 11:26:02 +0000 (12:26 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Sat, 21 Mar 2020 15:00:24 +0000 (16:00 +0100)
commit40db173965c05a1d803451240ed41707d5bd978d
treec5629cb1e7034131b69c247d392e256be5dfc396
parentde8f5e4f2dc1f032b46afda0a78cab5456974f89
lockdep: Add hrtimer context tracing bits

Set current->irq_config = 1 for hrtimers which are not marked to expire in
hard interrupt context during hrtimer_init(). These timers will expire in
softirq context on PREEMPT_RT.

Setting this allows lockdep to differentiate these timers. If a timer is
marked to expire in hard interrupt context then the timer callback is not
supposed to acquire a regular spinlock instead of a raw_spinlock in the
expiry callback.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200321113242.534508206@linutronix.de
include/linux/irqflags.h
include/linux/sched.h
kernel/locking/lockdep.c
kernel/time/hrtimer.c