[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251014211824.GA908020@bhelgaas>
Date: Tue, 14 Oct 2025 16:18:24 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Inochi Amaoto <inochiama@...il.com>
Cc: Nirmal Patel <nirmal.patel@...ux.intel.com>,
Jonathan Derrick <jonathan.derrick@...ux.dev>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof WilczyĆski <kwilczynski@...nel.org>,
Manivannan Sadhasivam <mani@...nel.org>,
Rob Herring <robh@...nel.org>, Bjorn Helgaas <bhelgaas@...gle.com>,
Chen Wang <unicorn_wang@...look.com>,
Thomas Gleixner <tglx@...utronix.de>,
Kenneth Crudup <kenny@...ix.com>, Genes Lists <lists@...ience.com>,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
Yixun Lan <dlan@...too.org>, Longbin Li <looong.bin@...il.com>
Subject: Re: [PATCH] PCI: vmd: override irq_startup()/irq_shutdown() in
vmd_init_dev_msi_info()
On Tue, Oct 14, 2025 at 09:46:07AM +0800, Inochi Amaoto wrote:
> Since commit 54f45a30c0d0 ("PCI/MSI: Add startup/shutdown for per
> device domains") set callback irq_startup() and irq_shutdown() of
> the struct pci_msi[x]_template, __irq_startup() will always invokes
> irq_startup() callback instead of irq_enable() callback overridden
> in vmd_init_dev_msi_info(). This will not start the irq correctly.
>
> Also override irq_startup()/irq_shutdown() in vmd_init_dev_msi_info(),
> so the irq_startup() can invoke the real logic.
>
> Fixes: 54f45a30c0d0 ("PCI/MSI: Add startup/shutdown for per device domains")
> Reported-by: Kenneth Crudup <kenny@...ix.com>
> Closes: https://lore.kernel.org/all/8a923590-5b3a-406f-a324-7bd1cf894d8f@panix.com/
> Signed-off-by: Inochi Amaoto <inochiama@...il.com>
> Tested-by: Kenneth R. Crudup <kenny@...ix.com>
Acked-by: Bjorn Helgaas <bhelgaas@...gle.com>
Thomas, I'm happy to take this via PCI you prefer. I acked it
because you merged 54f45a30c0d0.
If you take it, I wouldn't mind if you capitalized "Override" in the
subject to match the history.
Obviously this is v6.18 material since 54f45a30c0d0 is a v6.18-rc1
regression.
> ---
> drivers/pci/controller/vmd.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
> index 1bd5bf4a6097..b4b62b9ccc45 100644
> --- a/drivers/pci/controller/vmd.c
> +++ b/drivers/pci/controller/vmd.c
> @@ -192,6 +192,12 @@ static void vmd_pci_msi_enable(struct irq_data *data)
> data->chip->irq_unmask(data);
> }
>
> +static unsigned int vmd_pci_msi_startup(struct irq_data *data)
> +{
> + vmd_pci_msi_enable(data);
> + return 0;
> +}
> +
> static void vmd_irq_disable(struct irq_data *data)
> {
> struct vmd_irq *vmdirq = data->chip_data;
> @@ -210,6 +216,11 @@ static void vmd_pci_msi_disable(struct irq_data *data)
> vmd_irq_disable(data->parent_data);
> }
>
> +static void vmd_pci_msi_shutdown(struct irq_data *data)
> +{
> + vmd_pci_msi_disable(data);
> +}
> +
> static struct irq_chip vmd_msi_controller = {
> .name = "VMD-MSI",
> .irq_compose_msi_msg = vmd_compose_msi_msg,
> @@ -309,6 +320,8 @@ static bool vmd_init_dev_msi_info(struct device *dev, struct irq_domain *domain,
> if (!msi_lib_init_dev_msi_info(dev, domain, real_parent, info))
> return false;
>
> + info->chip->irq_startup = vmd_pci_msi_startup;
> + info->chip->irq_shutdown = vmd_pci_msi_shutdown;
> info->chip->irq_enable = vmd_pci_msi_enable;
> info->chip->irq_disable = vmd_pci_msi_disable;
> return true;
> --
> 2.51.0
>
Powered by blists - more mailing lists