From: Zhipeng.wang_1@oss.nxp.com
To: Thomas Gleixner <tglx@kernel.org>, Marc Zyngier <maz@kernel.org>,
Frank Li <Frank.Li@nxp.com>
Cc: Radu Rendec <radu@rendec.net>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Jindong Yue <jindong.yue@nxp.com>,
xuegang.liu@nxp.com, linux-kernel@vger.kernel.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 0/9] irqchip/imx-irqsteer: Allow building as module
Date: Fri, 21 Aug 2026 19:10:30 +0900 [thread overview]
Message-ID: <20260821101039.4037925-1-Zhipeng.wang_1@oss.nxp.com> (raw)
From: Zhipeng Wang <zhipeng.wang_1@nxp.com>
Thomas, apologies for the scattered irqsteer patches over the past
weeks. As you asked, this version consolidates everything related to
fixing this into one coherent series: the three separate series/patches
(including Fabio's, which conflicted with mine) are now merged here, the
overlapping runtime-PM work is reconciled, and the patches are split by
concern. No more piecemeal postings.
This series makes the i.MX IRQSTEER driver buildable as a module, along
with the pre-existing bug fixes that become reachable once the driver
can be unbound and reloaded.
What was previously scattered across three series/patches is now one
series:
- The three patches carrying Fixes: 28528fca4908 ("irqchip/imx-irqsteer:
Add multi output interrupts support") are now collected here: the
parent-IRQ-domain leak fix (devm-managed domain), Fabio's IRQ-count
validation, and the standalone chained_irq_exit() fix that was
previously sent on its own.
- Fabio Estevam's IRQ-count validation patch is folded in with his
authorship preserved; it supersedes the ordering that previously
validated the count after the domain was created.
- The clock/runtime-PM rework, the module enablement, and the irqdomain
helper cleanup are split into separate patches per Thomas' request,
rather than bundled into one change.
Patch overview:
1. Call chained_irq_exit() on the handler error path - balances the
chained IRQ enter/exit on the error path.
2. Use devm to manage the IRQ domain - devm_irq_domain_instantiate()
fixes the domain leak on the probe() sanity-check error path.
3. Validate IRQ count before creating domain (Fabio) - validate before
allocating so no domain is leaked and no dangling host_data is left.
4. Dispose of parent IRQ mappings in remove() - only the parent output
mappings need explicit disposal now that the domain is devres-owned.
5. Mask all interrupts in probe() - avoid an interrupt storm on reload
from stale CHANMASK state, without touching registers in remove()
while runtime-suspended.
6. Let devres own the clock and runtime PM - devm_clk_get_enabled() +
devm_pm_runtime_set_active_enabled(). remove() calls
pm_runtime_resume_and_get() so the devres clock teardown stays
balanced when the device was runtime-suspended (Frank Li).
7. Allow building as module - tristate Kconfig + module_platform_driver().
8. genirq/irqdomain: Add devm_irq_domain_create_linear() - a reusable
devres helper.
9. Use devm_irq_domain_create_linear() - switch the driver to the new
helper.
Changes in v5:
- Consolidate the three previously-scattered series/patches into one
series (Thomas Gleixner): the standalone chained_irq_exit() fix and
Fabio's IRQ-count validation patch are now included here.
- Fold in Fabio's IRQ-count validation patch with authorship preserved;
validate the count before creating the domain.
- remove() calls pm_runtime_resume_and_get() so the devres clock
teardown does not underflow the clock enable count when the device is
runtime-suspended (Frank Li).
- Fabio's "Convert to devm_pm_runtime_enable()" patch
(https://lore.kernel.org/lkml/20260817190621.335492-1-festevam@gmail.com/)
is superseded by patch 6, which uses
devm_pm_runtime_set_active_enabled() (as Frank suggested) and also
lets devres own the clock; it is credited with Suggested-by.
Changes in v4:
- New patch: add devm_irq_domain_create_linear() (Frank Li).
- Use the new devm helper to manage the domain instead of hand-rolling
an err_domain label; remove() drops irq_domain_remove() (Frank Li).
- Dispose of the parent mappings only; the child mapping disposal loop
is removed (Frank Li).
- Mask interrupts in probe() only; the remove() masking, which could
touch registers while runtime-suspended, is dropped (Frank Li).
Changes in v3:
- Split the single v2 patch into separate patches.
- Add the probe() error-path fix (Sashiko AI).
- Add CHANMASK masking in probe() (Sashiko AI).
- Let devres own the clock and runtime PM via devm_clk_get_enabled()
and devm_pm_runtime_set_active_enabled() (Frank Li).
v4: https://lore.kernel.org/r/20260819090543.585131-1-Zhipeng.wang_1@oss.nxp.com
v3: https://lore.kernel.org/r/20260807072346.1222389-1-Zhipeng.wang_1@oss.nxp.com
v2: https://lore.kernel.org/r/20260728092219.525449-1-Zhipeng.wang_1@oss.nxp.com
v1: https://lore.kernel.org/r/20260724090136.3595894-1-Zhipeng.wang_1@oss.nxp.com
chained_irq_exit() standalone patch:
https://lore.kernel.org/all/20260807072626.1231517-1-Zhipeng.wang_1@oss.nxp.com/
Fabio Estevam (1):
irqchip/imx-irqsteer: Validate IRQ count before creating domain
Jindong Yue (1):
irqchip/imx-irqsteer: Allow building as module
Zhipeng Wang (7):
irqchip/imx-irqsteer: Call chained_irq_exit() on the handler error
path
irqchip/imx-irqsteer: Use devm to manage the IRQ domain
irqchip/imx-irqsteer: Dispose of parent IRQ mappings in remove()
irqchip/imx-irqsteer: Mask all interrupts in probe()
irqchip/imx-irqsteer: Let devres own the clock and runtime PM
genirq/irqdomain: Add devm_irq_domain_create_linear()
irqchip/imx-irqsteer: Use devm_irq_domain_create_linear()
drivers/irqchip/Kconfig | 2 +-
drivers/irqchip/irq-imx-irqsteer.c | 70 +++++++++++++++++++-----------
include/linux/irqdomain.h | 30 +++++++++++++
3 files changed, 76 insertions(+), 26 deletions(-)
base-commit: bd5f485f3f026225b86573e559af0b7254ef4184
--
2.34.1
next reply other threads:[~2026-08-21 10:11 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 10:10 Zhipeng.wang_1 [this message]
2026-08-21 10:10 ` [PATCH v5 1/9] irqchip/imx-irqsteer: Call chained_irq_exit() on the handler error path Zhipeng.wang_1
2026-08-21 14:15 ` Frank Li
2026-08-29 20:54 ` Radu Rendec
2026-08-21 10:10 ` [PATCH v5 2/9] irqchip/imx-irqsteer: Use devm to manage the IRQ domain Zhipeng.wang_1
2026-08-21 10:10 ` [PATCH v5 3/9] irqchip/imx-irqsteer: Validate IRQ count before creating domain Zhipeng.wang_1
2026-08-21 14:24 ` Frank Li
2026-08-24 9:38 ` Zhipeng Wang (OSS)
2026-08-24 12:49 ` Fabio Estevam
2026-08-26 3:26 ` Zhipeng Wang (OSS)
2026-08-21 10:10 ` [PATCH v5 4/9] irqchip/imx-irqsteer: Dispose of parent IRQ mappings in remove() Zhipeng.wang_1
2026-08-30 16:30 ` Radu Rendec
2026-08-21 10:10 ` [PATCH v5 5/9] irqchip/imx-irqsteer: Mask all interrupts in probe() Zhipeng.wang_1
2026-08-30 18:51 ` Radu Rendec
2026-08-21 10:10 ` [PATCH v5 6/9] irqchip/imx-irqsteer: Let devres own the clock and runtime PM Zhipeng.wang_1
2026-08-30 19:31 ` Radu Rendec
2026-08-31 8:30 ` Zhipeng Wang (OSS)
2026-08-21 10:10 ` [PATCH v5 7/9] irqchip/imx-irqsteer: Allow building as module Zhipeng.wang_1
2026-09-03 1:16 ` Radu Rendec
2026-08-21 10:10 ` [PATCH v5 8/9] genirq/irqdomain: Add devm_irq_domain_create_linear() Zhipeng.wang_1
2026-08-21 10:10 ` [PATCH v5 9/9] irqchip/imx-irqsteer: Use devm_irq_domain_create_linear() Zhipeng.wang_1
-- strict thread matches above, loose matches on Subject: below --
2026-08-21 10:07 [PATCH v5 0/9] irqchip/imx-irqsteer: Allow building as module Zhipeng.wang_1
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=20260821101039.4037925-1-Zhipeng.wang_1@oss.nxp.com \
--to=zhipeng.wang_1@oss.nxp.com \
--cc=Frank.Li@nxp.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=jindong.yue@nxp.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=radu@rendec.net \
--cc=s.hauer@pengutronix.de \
--cc=tglx@kernel.org \
--cc=xuegang.liu@nxp.com \
/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