Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Rosen Penev <rosenp@gmail.com>
To: Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Clark Williams <clrkwllms@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Rosen Penev <rosenp@gmail.com>,
	Gregory CLEMENT <gregory.clement@bootlin.com>
Cc: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
	linux-gpio@vger.kernel.org, linux-rt-devel@lists.linux.dev
Subject: [PATCH 0/2] gpio: mvebu: resume and PREEMPT_RT irq mask fixes
Date: Thu,  3 Dec 2026 14:58:18 -0800	[thread overview]
Message-ID: <20261203225820.83277-1-rosenp@gmail.com> (raw)

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


             reply	other threads:[~2026-12-03 22:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 22:58 Rosen Penev [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261203225820.83277-1-rosenp@gmail.com \
    --to=rosenp@gmail.com \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=bigeasy@linutronix.de \
    --cc=brgl@kernel.org \
    --cc=clrkwllms@kernel.org \
    --cc=gregory.clement@bootlin.com \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox