leds: trigger: Disable CPU trigger on PREEMPT_RT
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 13 Oct 2021 09:37:19 +0000 (11:37 +0200)
committerPavel Machek <pavel@ucw.cz>
Wed, 13 Oct 2021 18:07:57 +0000 (20:07 +0200)
commit97b31c1f8eb865bc3aa5f4a08286a6406d782ea8
tree8e091f2c560334b4b176b133c4fdea5c443b90dd
parent2a5a8fa8b23144d14567d6f8293dd6fbeecee393
leds: trigger: Disable CPU trigger on PREEMPT_RT

The CPU trigger is invoked on ARM from CPU-idle. That trigger later
invokes led_trigger_event() which may invoke the callback of the actual driver.
That driver can acquire a spinlock_t which is okay on kernel without
PREEMPT_RT. On a PREEMPT_RT enabled kernel this lock is turned into a
sleeping lock and must not be acquired with disabled interrupts.

Disable the CPU trigger on PREEMPT_RT.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lkml.kernel.org/r/20210924111501.m57cwwn7ahiyxxdd@linutronix.de
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/trigger/Kconfig