From: sashiko-bot@kernel.org
To: Zhipeng.wang_1@oss.nxp.com
Cc: Frank.Li@kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH v3 3/4] irqchip/imx-irqsteer: Mask all interrupts in probe() and remove()
Date: Fri, 07 Aug 2026 08:12:45 +0000 [thread overview]
Message-ID: <20260807081245.D15EA1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260807072346.1222389-4-Zhipeng.wang_1@oss.nxp.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Missing `pm_runtime_get_sync()` in `imx_irqsteer_remove()` causes a fatal bus error on device unbind.
--
--- Patch [3]: [PATCH v3 3/4] irqchip/imx-irqsteer: Mask all interrupts in probe() and remove() ---
commit cdd5c75cd302eeb1d325e53989eb54042df373f6
Author: Zhipeng Wang <zhipeng.wang_1@nxp.com>
irqchip/imx-irqsteer: Mask all interrupts in probe() and remove()
This commit masks all interrupts in probe before wiring up chained handlers,
and again in remove to quiesce the hardware for the next probe. This is
intended to prevent interrupt storms on module reload.
> diff --git a/drivers/irqchip/irq-imx-irqsteer.c b/drivers/irqchip/irq-imx-irqsteer.c
> index 4a2fe8ba97f50..0c9c99f1141a9 100644
> --- a/drivers/irqchip/irq-imx-irqsteer.c
> +++ b/drivers/irqchip/irq-imx-irqsteer.c
[ ... ]
> @@ -279,6 +283,11 @@ static void imx_irqsteer_remove(struct platform_device *pdev)
> struct irqsteer_data *irqsteer_data = platform_get_drvdata(pdev);
> int hwirq, i;
>
> + /* mask all interrupts so a stale line cannot storm on the next probe */
> + for (i = 0; i < irqsteer_data->reg_num; i++)
> + writel_relaxed(0, irqsteer_data->regs +
> + CHANMASK(i, irqsteer_data->reg_num));
[Severity: High]
Will this hardware register access cause a fatal bus error during device unbind?
During driver unbind (via module unload or sysfs), the driver core explicitly
calls pm_runtime_put_sync() before calling the driver's remove callback. This
drops the runtime PM usage count and synchronously suspends the device, which
disables the device's clock.
If the hardware is already unclocked, does calling writel_relaxed() on the
CHANMASK hardware registers without first waking the device up via
pm_runtime_get_sync() trigger a synchronous external abort on i.MX platforms?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260807072346.1222389-1-Zhipeng.wang_1@oss.nxp.com?part=3
next prev parent reply other threads:[~2026-08-07 8:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 7:23 [PATCH v3 0/4] irqchip/imx-irqsteer: Allow building as module Zhipeng.wang_1
2026-08-07 7:23 ` [PATCH v3 1/4] irqchip/imx-irqsteer: Fix error handling path in probe() Zhipeng.wang_1
2026-08-07 7:45 ` sashiko-bot
2026-08-07 19:01 ` Frank Li
2026-08-07 7:23 ` [PATCH v3 2/4] irqchip/imx-irqsteer: Dispose of IRQ mappings in remove() Zhipeng.wang_1
2026-08-07 19:11 ` Frank Li
2026-08-07 7:23 ` [PATCH v3 3/4] irqchip/imx-irqsteer: Mask all interrupts in probe() and remove() Zhipeng.wang_1
2026-08-07 8:12 ` sashiko-bot [this message]
2026-08-07 19:14 ` Frank Li
2026-08-07 7:23 ` [PATCH v3 4/4] irqchip/imx-irqsteer: Allow building as module Zhipeng.wang_1
2026-08-07 8:29 ` sashiko-bot
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=20260807081245.D15EA1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=Zhipeng.wang_1@oss.nxp.com \
--cc=imx@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/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