Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH] gpio: mvebu: fix sleeping-while-atomic in mvebu_gpio_level_irq_mask()
@ 2026-11-05 12:46 Bartosz Golaszewski
  2026-11-05 12:54 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Golaszewski @ 2026-11-05 12:46 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Andrew Lunn, Baruch Siach
  Cc: linux-gpio, linux-kernel, stable, Bartosz Golaszewski

mvebu_gpio_write_level_mask() is called with a raw spinlock taken but
the underlying regmap uses a standard spinlock which can sleep on
RT_PREEMPT kernels. Add the .use_raw_spinlock attribute to the
appropriate regmap config.

Cc: stable@vger.kernel.org
Fixes: 48f32a835373 ("gpio: mvebu: switch pwm duration registers to regmap")
Closes: https://sashiko.dev/#/bug/linux-6bee0c4f-384c-494c-868e-07c420195d13
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
 drivers/gpio/gpio-mvebu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 267e6d5bacd0d1c9de0ebb7e21233bc9e2cd3bad..02d9ae5869d75ccc9ac78c41650b9f21b18ffdaa 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -603,6 +603,7 @@ static const struct regmap_config mvebu_gpio_regmap_config = {
 	.reg_bits = 32,
 	.reg_stride = 4,
 	.val_bits = 32,
+	.use_raw_spinlock = true,
 };
 
 static const struct regmap_config mvebu_gpio_percpu_regmap_config = {

---
base-commit: 8b7179210b22f8e48a82c5ceacb9d56a9c4cfec4
change-id: 20261105-gpio-mvebu-sleeping-while-atomic-3b3fed029f7b

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>


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

end of thread, other threads:[~2026-11-05 12:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-05 12:46 [PATCH] gpio: mvebu: fix sleeping-while-atomic in mvebu_gpio_level_irq_mask() Bartosz Golaszewski
2026-11-05 12:54 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox