[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cbcb0183-1fbd-4815-948b-3c380491c8db@ti.com>
Date: Sat, 20 Sep 2025 13:34:15 +0530
From: Siddharth Vadapalli <s-vadapalli@...com>
To: Manivannan Sadhasivam <mani@...nel.org>
CC: Siddharth Vadapalli <s-vadapalli@...com>, <lpieralisi@...nel.org>,
<kwilczynski@...nel.org>, <robh@...nel.org>, <bhelgaas@...gle.com>,
<jingoohan1@...il.com>, <christian.bruel@...s.st.com>,
<qiang.yu@....qualcomm.com>, <mayank.rana@....qualcomm.com>,
<thippeswamy.havalige@....com>, <shradha.t@...sung.com>,
<quic_schintav@...cinc.com>, <inochiama@...il.com>,
<cassel@...nel.org>, <kishon@...nel.org>,
<sergio.paracuellos@...il.com>, <18255117159@....com>,
<rongqianfeng@...o.com>, <jirislaby@...nel.org>,
<linux-pci@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <srk@...com>
Subject: Re: [PATCH v2 05/10] PCI: keystone: Add ks_pcie_free_msi_irq()
helper for cleanup
On Sat, Sep 20, 2025 at 12:02:34AM +0530, Manivannan Sadhasivam wrote:
> On Fri, Sep 12, 2025 at 05:46:16PM +0530, Siddharth Vadapalli wrote:
> > Introduce the helper function ks_pcie_free_msi_irq() which will undo the
> > configuration performed by the ks_pcie_config_msi_irq() function. This will
> > be required for implementing a future helper function to undo the
> > configuration performed by the ks_pcie_host_init() function.
> >
> > Signed-off-by: Siddharth Vadapalli <s-vadapalli@...com>
> > ---
> >
> > v1: https://lore.kernel.org/r/20250903124505.365913-6-s-vadapalli@ti.com/
> > No changes since v1.
> >
> > drivers/pci/controller/dwc/pci-keystone.c | 25 +++++++++++++++++++++++
> > 1 file changed, 25 insertions(+)
> >
> > diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c
> > index d03e95bf7d54..81c3686688c0 100644
> > --- a/drivers/pci/controller/dwc/pci-keystone.c
> > +++ b/drivers/pci/controller/dwc/pci-keystone.c
> > @@ -666,6 +666,31 @@ static void ks_pcie_intx_irq_handler(struct irq_desc *desc)
> > chained_irq_exit(chip, desc);
> > }
> >
> > +static void ks_pcie_free_msi_irq(struct keystone_pcie *ks_pcie)
> > +{
> > + struct device_node *np = ks_pcie->np;
> > + struct device_node *intc_np;
> > + int irq_count, irq, i;
> > +
> > + if (!IS_ENABLED(CONFIG_PCI_MSI))
>
> Isn't the CONFIG_PCI_KEYSTONE_HOST always depend on PCI_MSI?
The reason I added the check is that it exists in 'ks_pcie_config_msi_irq()'.
But I realize now that it should be removed from
'ks_pcie_config_msi_irq()' as well. Since I had written the above
function with the objective of undoing the changes done by
'ks_pcie_config_msi_irq()', the 'config check' was retained since the
changes should be undone only if they were executed by
'ks_pcie_config_msi_irq()'. I will drop the check in the v3 series and
will also post a separate patch to drop if from 'ks_pcie_config_msi_irq()'
if that is acceptable. Please let me know.
Regards,
Siddharth.
Powered by blists - more mailing lists