* [PATCH 0/2] PCI: dwc: Make the MSI domain naming explicit
@ 2026-09-30 2:22 Shawn Lin
2026-09-30 2:22 ` [PATCH 1/2] PCI: dwc: Rename dw_pcie_allocate_domains to dw_pcie_allocate_msi_domains Shawn Lin
2026-09-30 2:22 ` [PATCH 2/2] PCI: dwc: Rename pp->irq_domain to pp->msi_irq_domain Shawn Lin
0 siblings, 2 replies; 6+ messages in thread
From: Shawn Lin @ 2026-09-30 2:22 UTC (permalink / raw)
To: Manivannan Sadhasivam, Bjorn Helgaas; +Cc: linux-pci, Shawn Lin
I was looking into whether the DWC core provides a common INTx irq
domain registration and handling flow, as several glue drivers owning
a legacy interrupt controller copy-paste the same code (get the
"legacy-interrupt-controller" child node, create a linear domain with
a one-line .map callback, install a chained handler).
The DWC core has no INTx equivalent at all: dw_pcie_allocate_domains()
looks like it could be that helper at first glance, but it only
creates the MSI parent irq domain (msi_create_parent_irq_domain() with
DOMAIN_BUS_PCI_MSI). Likewise, struct dw_pcie_rp::irq_domain only
serves the MSI parent domain.
So make the naming explicit:
patch 1 renames dw_pcie_allocate_domains() to
dw_pcie_allocate_msi_domains().
patch 2 renames struct dw_pcie_rp::irq_domain to ::msi_irq_domain.
Shawn Lin (2):
PCI: dwc: Rename dw_pcie_allocate_domains to
dw_pcie_allocate_msi_domains
PCI: dwc: Rename pp->irq_domain to pp->msi_irq_domain
drivers/pci/controller/dwc/pci-dra7xx.c | 2 +-
drivers/pci/controller/dwc/pci-keystone.c | 4 ++--
drivers/pci/controller/dwc/pcie-designware-host.c | 14 +++++++-------
drivers/pci/controller/dwc/pcie-designware.h | 6 +++---
4 files changed, 13 insertions(+), 13 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/2] PCI: dwc: Rename dw_pcie_allocate_domains to dw_pcie_allocate_msi_domains 2026-09-30 2:22 [PATCH 0/2] PCI: dwc: Make the MSI domain naming explicit Shawn Lin @ 2026-09-30 2:22 ` Shawn Lin 2026-09-30 9:16 ` sashiko-bot 2026-09-30 2:22 ` [PATCH 2/2] PCI: dwc: Rename pp->irq_domain to pp->msi_irq_domain Shawn Lin 1 sibling, 1 reply; 6+ messages in thread From: Shawn Lin @ 2026-09-30 2:22 UTC (permalink / raw) To: Manivannan Sadhasivam, Bjorn Helgaas; +Cc: linux-pci, Shawn Lin Rename dw_pcie_allocate_domains() to dw_pcie_allocate_msi_domains() so that the name says what it allocates and cannot be mistaken for a generic domain allocator. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> --- drivers/pci/controller/dwc/pci-keystone.c | 2 +- drivers/pci/controller/dwc/pcie-designware-host.c | 6 +++--- drivers/pci/controller/dwc/pcie-designware.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c index b8e3032..c35f3f4 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -309,7 +309,7 @@ static int ks_pcie_msi_host_init(struct dw_pcie_rp *pp) dw_pcie_writel_dbi(pci, PCI_BASE_ADDRESS_0, ks_pcie->app.start); pp->msi_irq_chip = &ks_pcie_msi_irq_chip; - return dw_pcie_allocate_domains(pp); + return dw_pcie_allocate_msi_domains(pp); } static void ks_pcie_handle_intx_irq(struct keystone_pcie *ks_pcie, diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c index f5a38e6..7fb165c 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -207,7 +207,7 @@ static const struct irq_domain_ops dw_pcie_msi_domain_ops = { .free = dw_pcie_irq_domain_free, }; -int dw_pcie_allocate_domains(struct dw_pcie_rp *pp) +int dw_pcie_allocate_msi_domains(struct dw_pcie_rp *pp) { struct dw_pcie *pci = to_dw_pcie_from_pp(pp); struct irq_domain_info info = { @@ -225,7 +225,7 @@ int dw_pcie_allocate_domains(struct dw_pcie_rp *pp) return 0; } -EXPORT_SYMBOL_GPL(dw_pcie_allocate_domains); +EXPORT_SYMBOL_GPL(dw_pcie_allocate_msi_domains); void dw_pcie_free_msi(struct dw_pcie_rp *pp) { @@ -342,7 +342,7 @@ int dw_pcie_msi_host_init(struct dw_pcie_rp *pp) pp->msi_irq_chip = &dw_pci_msi_bottom_irq_chip; - ret = dw_pcie_allocate_domains(pp); + ret = dw_pcie_allocate_msi_domains(pp); if (ret) return ret; diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h index a53ac27..22e8f95 100644 --- a/drivers/pci/controller/dwc/pcie-designware.h +++ b/drivers/pci/controller/dwc/pcie-designware.h @@ -869,7 +869,7 @@ void dw_pcie_free_msi(struct dw_pcie_rp *pp); int dw_pcie_setup_rc(struct dw_pcie_rp *pp); int dw_pcie_host_init(struct dw_pcie_rp *pp); void dw_pcie_host_deinit(struct dw_pcie_rp *pp); -int dw_pcie_allocate_domains(struct dw_pcie_rp *pp); +int dw_pcie_allocate_msi_domains(struct dw_pcie_rp *pp); void __iomem *dw_pcie_own_conf_map_bus(struct pci_bus *bus, unsigned int devfn, int where); #else @@ -910,7 +910,7 @@ static inline void dw_pcie_host_deinit(struct dw_pcie_rp *pp) { } -static inline int dw_pcie_allocate_domains(struct dw_pcie_rp *pp) +static inline int dw_pcie_allocate_msi_domains(struct dw_pcie_rp *pp) { return 0; } -- 2.7.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] PCI: dwc: Rename dw_pcie_allocate_domains to dw_pcie_allocate_msi_domains 2026-09-30 2:22 ` [PATCH 1/2] PCI: dwc: Rename dw_pcie_allocate_domains to dw_pcie_allocate_msi_domains Shawn Lin @ 2026-09-30 9:16 ` sashiko-bot 0 siblings, 0 replies; 6+ messages in thread From: sashiko-bot @ 2026-09-30 9:16 UTC (permalink / raw) To: Shawn Lin; +Cc: linux-pci > Rename dw_pcie_allocate_domains() to dw_pcie_allocate_msi_domains() so that > the name says what it allocates and cannot be mistaken for a generic domain > allocator. > > Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review · https://sashiko.dev/#/patchset/1790734930-217000-1-git-send-email-shawn.lin@rock-chips.com?part=1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] PCI: dwc: Rename pp->irq_domain to pp->msi_irq_domain 2026-09-30 2:22 [PATCH 0/2] PCI: dwc: Make the MSI domain naming explicit Shawn Lin 2026-09-30 2:22 ` [PATCH 1/2] PCI: dwc: Rename dw_pcie_allocate_domains to dw_pcie_allocate_msi_domains Shawn Lin @ 2026-09-30 2:22 ` Shawn Lin 2026-09-30 4:10 ` Vignesh Raghavendra 2026-09-30 9:17 ` sashiko-bot 1 sibling, 2 replies; 6+ messages in thread From: Shawn Lin @ 2026-09-30 2:22 UTC (permalink / raw) To: Manivannan Sadhasivam, Bjorn Helgaas Cc: linux-pci, Shawn Lin, Vignesh Raghavendra pp->irq_domain is exclusively the MSI parent irq domain: it is created by dw_pcie_allocate_msi_domains() with msi_create_parent_irq_domain() and is only used to resolve the MSI child virqs in dw_handle_msi_irq() and in the keystone and dra7xx MSI handlers. The name gives no hint about that, in the same way dw_pcie_allocate_domains() did not say that it was only about MSI. Rename it to pp->msi_irq_domain, matching the previous rename. Cc: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> --- drivers/pci/controller/dwc/pci-dra7xx.c | 2 +- drivers/pci/controller/dwc/pci-keystone.c | 2 +- drivers/pci/controller/dwc/pcie-designware-host.c | 8 ++++---- drivers/pci/controller/dwc/pcie-designware.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c index 3460a83..0d56fd5 100644 --- a/drivers/pci/controller/dwc/pci-dra7xx.c +++ b/drivers/pci/controller/dwc/pci-dra7xx.c @@ -213,7 +213,7 @@ static int dra7xx_pcie_handle_msi(struct dw_pcie_rp *pp, int index) pos = find_first_bit(&val, MAX_MSI_IRQS_PER_CTRL); while (pos != MAX_MSI_IRQS_PER_CTRL) { - generic_handle_domain_irq(pp->irq_domain, + generic_handle_domain_irq(pp->msi_irq_domain, (index * MAX_MSI_IRQS_PER_CTRL) + pos); pos++; pos = find_next_bit(&val, MAX_MSI_IRQS_PER_CTRL, pos); diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c index c35f3f4..388a97c 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -633,7 +633,7 @@ static void ks_pcie_msi_irq_handler(struct irq_desc *desc) vector = offset + (pos << 3); dev_dbg(dev, "irq: bit %d, vector %d\n", pos, vector); - generic_handle_domain_irq(pp->irq_domain, vector); + generic_handle_domain_irq(pp->msi_irq_domain, vector); } chained_irq_exit(chip, desc); diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c index 7fb165c..0bf9a59 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -82,7 +82,7 @@ void dw_handle_msi_irq(struct dw_pcie_rp *pp) continue; for_each_set_bit(pos, &status, MAX_MSI_IRQS_PER_CTRL) - generic_handle_demux_domain_irq(pp->irq_domain, irq_off + pos); + generic_handle_demux_domain_irq(pp->msi_irq_domain, irq_off + pos); } } @@ -217,8 +217,8 @@ int dw_pcie_allocate_msi_domains(struct dw_pcie_rp *pp) .host_data = pp, }; - pp->irq_domain = msi_create_parent_irq_domain(&info, &dw_pcie_msi_parent_ops); - if (!pp->irq_domain) { + pp->msi_irq_domain = msi_create_parent_irq_domain(&info, &dw_pcie_msi_parent_ops); + if (!pp->msi_irq_domain) { dev_err(pci->dev, "Failed to create IRQ domain\n"); return -ENOMEM; } @@ -236,7 +236,7 @@ void dw_pcie_free_msi(struct dw_pcie_rp *pp) irq_set_chained_handler_and_data(pp->msi_irq[ctrl], NULL, NULL); } - irq_domain_remove(pp->irq_domain); + irq_domain_remove(pp->msi_irq_domain); } EXPORT_SYMBOL_GPL(dw_pcie_free_msi); diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h index 22e8f95..f2fdc29 100644 --- a/drivers/pci/controller/dwc/pcie-designware.h +++ b/drivers/pci/controller/dwc/pcie-designware.h @@ -454,7 +454,7 @@ struct dw_pcie_rp { int irq; const struct dw_pcie_host_ops *ops; int msi_irq[MAX_MSI_CTRLS]; - struct irq_domain *irq_domain; + struct irq_domain *msi_irq_domain; dma_addr_t msi_data; struct irq_chip *msi_irq_chip; u32 num_vectors; -- 2.7.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] PCI: dwc: Rename pp->irq_domain to pp->msi_irq_domain 2026-09-30 2:22 ` [PATCH 2/2] PCI: dwc: Rename pp->irq_domain to pp->msi_irq_domain Shawn Lin @ 2026-09-30 4:10 ` Vignesh Raghavendra 2026-09-30 9:17 ` sashiko-bot 1 sibling, 0 replies; 6+ messages in thread From: Vignesh Raghavendra @ 2026-09-30 4:10 UTC (permalink / raw) To: Shawn Lin, Manivannan Sadhasivam, Bjorn Helgaas; +Cc: linux-pci On 30/09/26 07:52, Shawn Lin wrote: > pp->irq_domain is exclusively the MSI parent irq domain: it is created > by dw_pcie_allocate_msi_domains() with msi_create_parent_irq_domain() > and is only used to resolve the MSI child virqs in dw_handle_msi_irq() > and in the keystone and dra7xx MSI handlers. The name gives no hint > about that, in the same way dw_pcie_allocate_domains() did not say that > it was only about MSI. > > Rename it to pp->msi_irq_domain, matching the previous rename. > > Cc: Vignesh Raghavendra <vigneshr@ti.com> > Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> > --- > Hmm for some reason I dont see this on the lore: https://lore.kernel.org/all/1790734930-217000-1-git-send-email-shawn.lin@rock-chips.com/ Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com> > drivers/pci/controller/dwc/pci-dra7xx.c | 2 +- > drivers/pci/controller/dwc/pci-keystone.c | 2 +- > drivers/pci/controller/dwc/pcie-designware-host.c | 8 ++++---- > drivers/pci/controller/dwc/pcie-designware.h | 2 +- > 4 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c > index 3460a83..0d56fd5 100644 > --- a/drivers/pci/controller/dwc/pci-dra7xx.c > +++ b/drivers/pci/controller/dwc/pci-dra7xx.c > @@ -213,7 +213,7 @@ static int dra7xx_pcie_handle_msi(struct dw_pcie_rp *pp, int index) > > pos = find_first_bit(&val, MAX_MSI_IRQS_PER_CTRL); > while (pos != MAX_MSI_IRQS_PER_CTRL) { > - generic_handle_domain_irq(pp->irq_domain, > + generic_handle_domain_irq(pp->msi_irq_domain, > (index * MAX_MSI_IRQS_PER_CTRL) + pos); > pos++; > pos = find_next_bit(&val, MAX_MSI_IRQS_PER_CTRL, pos); > diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c > index c35f3f4..388a97c 100644 > --- a/drivers/pci/controller/dwc/pci-keystone.c > +++ b/drivers/pci/controller/dwc/pci-keystone.c > @@ -633,7 +633,7 @@ static void ks_pcie_msi_irq_handler(struct irq_desc *desc) > > vector = offset + (pos << 3); > dev_dbg(dev, "irq: bit %d, vector %d\n", pos, vector); > - generic_handle_domain_irq(pp->irq_domain, vector); > + generic_handle_domain_irq(pp->msi_irq_domain, vector); > } > > chained_irq_exit(chip, desc); > diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c > index 7fb165c..0bf9a59 100644 > --- a/drivers/pci/controller/dwc/pcie-designware-host.c > +++ b/drivers/pci/controller/dwc/pcie-designware-host.c > @@ -82,7 +82,7 @@ void dw_handle_msi_irq(struct dw_pcie_rp *pp) > continue; > > for_each_set_bit(pos, &status, MAX_MSI_IRQS_PER_CTRL) > - generic_handle_demux_domain_irq(pp->irq_domain, irq_off + pos); > + generic_handle_demux_domain_irq(pp->msi_irq_domain, irq_off + pos); > } > } > > @@ -217,8 +217,8 @@ int dw_pcie_allocate_msi_domains(struct dw_pcie_rp *pp) > .host_data = pp, > }; > > - pp->irq_domain = msi_create_parent_irq_domain(&info, &dw_pcie_msi_parent_ops); > - if (!pp->irq_domain) { > + pp->msi_irq_domain = msi_create_parent_irq_domain(&info, &dw_pcie_msi_parent_ops); > + if (!pp->msi_irq_domain) { > dev_err(pci->dev, "Failed to create IRQ domain\n"); > return -ENOMEM; > } > @@ -236,7 +236,7 @@ void dw_pcie_free_msi(struct dw_pcie_rp *pp) > irq_set_chained_handler_and_data(pp->msi_irq[ctrl], NULL, NULL); > } > > - irq_domain_remove(pp->irq_domain); > + irq_domain_remove(pp->msi_irq_domain); > } > EXPORT_SYMBOL_GPL(dw_pcie_free_msi); > > diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h > index 22e8f95..f2fdc29 100644 > --- a/drivers/pci/controller/dwc/pcie-designware.h > +++ b/drivers/pci/controller/dwc/pcie-designware.h > @@ -454,7 +454,7 @@ struct dw_pcie_rp { > int irq; > const struct dw_pcie_host_ops *ops; > int msi_irq[MAX_MSI_CTRLS]; > - struct irq_domain *irq_domain; > + struct irq_domain *msi_irq_domain; > dma_addr_t msi_data; > struct irq_chip *msi_irq_chip; > u32 num_vectors; -- Regards Vignesh https://ti.com/opensource ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] PCI: dwc: Rename pp->irq_domain to pp->msi_irq_domain 2026-09-30 2:22 ` [PATCH 2/2] PCI: dwc: Rename pp->irq_domain to pp->msi_irq_domain Shawn Lin 2026-09-30 4:10 ` Vignesh Raghavendra @ 2026-09-30 9:17 ` sashiko-bot 1 sibling, 0 replies; 6+ messages in thread From: sashiko-bot @ 2026-09-30 9:17 UTC (permalink / raw) To: Shawn Lin; +Cc: linux-pci > pp->irq_domain is exclusively the MSI parent irq domain: it is created > by dw_pcie_allocate_msi_domains() with msi_create_parent_irq_domain() > and is only used to resolve the MSI child virqs in dw_handle_msi_irq() > and in the keystone and dra7xx MSI handlers. The name gives no hint > about that, in the same way dw_pcie_allocate_domains() did not say that > it was only about MSI. > > Rename it to pp->msi_irq_domain, matching the previous rename. > > Cc: Vignesh Raghavendra <vigneshr@ti.com> > Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review · https://sashiko.dev/#/patchset/1790734930-217000-1-git-send-email-shawn.lin@rock-chips.com?part=2 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-09-30 9:17 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-09-30 2:22 [PATCH 0/2] PCI: dwc: Make the MSI domain naming explicit Shawn Lin 2026-09-30 2:22 ` [PATCH 1/2] PCI: dwc: Rename dw_pcie_allocate_domains to dw_pcie_allocate_msi_domains Shawn Lin 2026-09-30 9:16 ` sashiko-bot 2026-09-30 2:22 ` [PATCH 2/2] PCI: dwc: Rename pp->irq_domain to pp->msi_irq_domain Shawn Lin 2026-09-30 4:10 ` Vignesh Raghavendra 2026-09-30 9:17 ` sashiko-bot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox