Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] gpio: mvebu: resume and PREEMPT_RT irq mask fixes
@ 2026-12-03 22:58 Rosen Penev
  2026-12-03 22:58 ` [PATCH 1/2] gpio: mvebu: restore suspend-time irq masks under gc->lock Rosen Penev
  2026-12-03 22:58 ` [PATCH 2/2] gpio: mvebu: use a raw-locked regmap on Armada 7K/8K too Rosen Penev
  0 siblings, 2 replies; 4+ messages in thread
From: Rosen Penev @ 2026-12-03 22:58 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Sebastian Andrzej Siewior,
	Clark Williams, Steven Rostedt, Rosen Penev, Gregory CLEMENT
  Cc: Bartosz Golaszewski, linux-gpio, linux-rt-devel

Two fixes for the irq mask registers.

Patch 1 closes a race in resume. The mask registers were rebuilt from a
snapshot of the irqchip mask cache taken under gc->lock, but written
after the lock was dropped. A mask or unmask in between was lost, and
could leave a level line unmasked behind genirq's back.

Patch 2 extends commit 42269cdb3d3b ("gpio: mvebu: fix sleeping-while-
atomic in mvebu_gpio_level_irq_mask()") to Armada 7K/8K. There the
driver used the parent's syscon regmap, which has an ordinary spinlock,
so the mask/unmask callbacks still slept under the raw gc->lock on
PREEMPT_RT. The driver now maps the parent's range and uses its own
raw-locked regmap.

The series is based on gpio/for-current, which has commit d8e27d042747
("gpio: mvebu: fix Armada XP per-CPU mask register save/restore") that
patch 1 builds on.

Each patch builds with W=1 for arm64 (defconfig + PREEMPT_RT +
PROVE_LOCKING). Neither has been tested on hardware yet.

Rosen Penev (2):
  gpio: mvebu: restore suspend-time irq masks under gc->lock
  gpio: mvebu: use a raw-locked regmap on Armada 7K/8K too

 drivers/gpio/gpio-mvebu.c | 114 +++++++++++++++++++++++---------------
 1 file changed, 70 insertions(+), 44 deletions(-)


base-commit: f4379936003e4a233ed8d7b8ab299630bae85fec
-- 
2.56.1


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

end of thread, other threads:[~2026-12-03 23:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 22:58 [PATCH 0/2] gpio: mvebu: resume and PREEMPT_RT irq mask fixes Rosen Penev
2026-12-03 22:58 ` [PATCH 1/2] gpio: mvebu: restore suspend-time irq masks under gc->lock Rosen Penev
2026-12-03 23:14   ` sashiko-bot
2026-12-03 22:58 ` [PATCH 2/2] gpio: mvebu: use a raw-locked regmap on Armada 7K/8K too Rosen Penev

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