All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] leds: trigger: Disable CPU trigger on PREEMPT_RT
@ 2021-09-24 11:15 Sebastian Andrzej Siewior
  2021-09-27 14:23 ` Pavel Machek
  0 siblings, 1 reply; 16+ messages in thread
From: Sebastian Andrzej Siewior @ 2021-09-24 11:15 UTC (permalink / raw)
  To: linux-leds; +Cc: Pavel Machek, Thomas Gleixner

The CPU trigger is invoked on ARM from CPU-idle. That trigger later
invokes led_trigger_event() which acquires a read lock in an IRQ-off
section. The problematic part on PREEMPT_RT is that this lock is turned
into a sleeping lock and must not be acquired with disabled interrupts.

The problem continues as that the LED driver underneath must not acquire
any sleeping locks itself.

Disable the CPU trigger on PREEMPT_RT.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/leds/trigger/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/leds/trigger/Kconfig b/drivers/leds/trigger/Kconfig
index 1f1d572880859..dc6816d36d069 100644
--- a/drivers/leds/trigger/Kconfig
+++ b/drivers/leds/trigger/Kconfig
@@ -64,6 +64,7 @@ config LEDS_TRIGGER_BACKLIGHT
 
 config LEDS_TRIGGER_CPU
 	bool "LED CPU Trigger"
+	depends on !PREEMPT_RT
 	help
 	  This allows LEDs to be controlled by active CPUs. This shows
 	  the active CPUs across an array of LEDs so you can see which
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-10-13 18:08 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-24 11:15 [PATCH] leds: trigger: Disable CPU trigger on PREEMPT_RT Sebastian Andrzej Siewior
2021-09-27 14:23 ` Pavel Machek
2021-09-27 15:35   ` Thomas Gleixner
2021-09-27 15:44     ` Pavel Machek
2021-09-27 17:18       ` Sebastian Andrzej Siewior
2021-09-27 17:36         ` Johannes Berg
2021-09-27 19:06         ` Pavel Machek
2021-09-27 19:34           ` Sebastian Andrzej Siewior
2021-10-13  8:08             ` Pavel Machek
2021-10-13  8:39               ` Sebastian Andrzej Siewior
2021-10-13  8:42                 ` Pavel Machek
2021-10-13  9:08                   ` Sebastian Andrzej Siewior
2021-10-13  9:37                   ` [PATCH v2] " Sebastian Andrzej Siewior
2021-10-13 18:08                     ` Pavel Machek
2021-09-28  0:14           ` [PATCH] " Thomas Gleixner
2021-09-27 18:48       ` Thomas Gleixner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.