From: Sean Anderson <sanderson@brivo.com>
To: Ulf Hansson <ulfh@kernel.org>, linux-mmc@vger.kernel.org
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
linux-arm-kernel@lists.infradead.org,
Jerome Brunet <jbrunet@baylibre.com>,
linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org,
Sean Anderson <sanderson@brivo.com>
Subject: [PATCH] mmc: meson-gx: Convert host->lock to raw spinlock
Date: Mon, 21 Sep 2026 15:13:08 -0400 [thread overview]
Message-ID: <20260921191326.2146363-1-sanderson@brivo.com> (raw)
The primary handler for IRQF_ONESHOT interrupts is always run without
threading, even on PREEMPT_RT. Therefore, we must use a raw spinlock,
which will never sleep (even on PREEMPT_RT).
Fixes: 066ecde6d826 ("mmc: meson-gx: add SDIO interrupt support")
Signed-off-by: Sean Anderson <sanderson@brivo.com>
---
drivers/mmc/host/meson-gx-mmc.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 694bb443d5f3f..d5365c0404cb9 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -176,7 +176,7 @@ struct meson_host {
bool needs_pre_post_req;
- spinlock_t lock;
+ raw_spinlock_t lock;
};
#define CMD_CFG_LENGTH_MASK GENMASK(8, 0)
@@ -953,10 +953,10 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
cmd = host->cmd;
if (status & IRQ_SDIO) {
- spin_lock(&host->lock);
+ raw_spin_lock(&host->lock);
__meson_mmc_enable_sdio_irq(host->mmc, 0);
sdio_signal_irq(host->mmc);
- spin_unlock(&host->lock);
+ raw_spin_unlock(&host->lock);
status &= ~IRQ_SDIO;
if (!status)
return IRQ_HANDLED;
@@ -1112,9 +1112,9 @@ static void meson_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
struct meson_host *host = mmc_priv(mmc);
unsigned long flags;
- spin_lock_irqsave(&host->lock, flags);
+ raw_spin_lock_irqsave(&host->lock, flags);
__meson_mmc_enable_sdio_irq(mmc, enable);
- spin_unlock_irqrestore(&host->lock, flags);
+ raw_spin_unlock_irqrestore(&host->lock, flags);
}
static void meson_mmc_ack_sdio_irq(struct mmc_host *mmc)
@@ -1225,7 +1225,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
if (ret)
goto err_init_clk;
- spin_lock_init(&host->lock);
+ raw_spin_lock_init(&host->lock);
if (host->dram_access_quirk) {
/* Limit segments to 1 due to low available sram memory */
---
base-commit: 587858367581b9c55c3690f4e63382ad622719d4
branch: meson_mmc_raw
--
2.53.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next reply other threads:[~2026-09-21 19:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 19:13 Sean Anderson [this message]
2026-09-28 16:17 ` Ulf Hansson
2026-09-28 16:22 ` Sean Anderson
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=20260921191326.2146363-1-sanderson@brivo.com \
--to=sanderson@brivo.com \
--cc=hkallweit1@gmail.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=ulfh@kernel.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
all inboxes | Powered by JetHome®