[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <o5d3uiuntafsbblqyt2ltcgckpo4ugc6rlkb6vyk6kzf4ngaen@cb623hd6zs2g>
Date: Thu, 28 Aug 2025 07:07:10 +0800
From: Inochi Amaoto <inochiama@...il.com>
To: Bjorn Helgaas <bhelgaas@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>, Marc Zyngier <maz@...nel.org>,
Lorenzo Pieralisi <lpieralisi@...nel.org>, Inochi Amaoto <inochiama@...il.com>,
Shradha Gupta <shradhagupta@...ux.microsoft.com>, Chen Wang <unicorn_wang@...look.com>
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
Linux Kernel Functional Testing <lkft@...aro.org>, Nathan Chancellor <nathan@...nel.org>,
Wei Fang <wei.fang@....com>, Jon Hunter <jonathanh@...dia.com>
Subject: Re: [PATCH] PCI/MSI: Check MSI_FLAG_PCI_MSI_MASK_PARENT in
cond_[startup|shutdown]_parent()
On Thu, Aug 28, 2025 at 07:03:53AM +0800, Inochi Amaoto wrote:
> For msi controller that only supports MSI_FLAG_PCI_MSI_MASK_PARENT,
> the newly added callback irq_startup() and irq_shutdown() for
> pci_msi[x]_tamplete will not unmask/mask the interrupt when startup/
> shutdown the interrupt. This will prevent the interrupt from being
> enabled/disabled normally.
>
> Add the missing check for MSI_FLAG_PCI_MSI_MASK_PARENT in the
> cond_[startup|shutdown]_parent(). So the interrupt can be normally
> unmasked/masked if it does not support MSI_FLAG_PCI_MSI_MASK_PARENT.
>
> Fixes: 54f45a30c0d0 ("PCI/MSI: Add startup/shutdown for per device domains")
> Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
> Closes: https://lore.kernel.org/regressions/aK4O7Hl8NCVEMznB@monster/
> Reported-by: Nathan Chancellor <nathan@...nel.org>
> Closes: https://lore.kernel.org/regressions/20250826220959.GA4119563@ax162/
> Reported-by: Wei Fang <wei.fang@....com>
> Closes: https://lore.kernel.org/all/20250827093911.1218640-1-wei.fang@nxp.com/
> Signed-off-by: Inochi Amaoto <inochiama@...il.com>
> Tested-by: Nathan Chancellor <nathan@...nel.org>
> Tested-by: Linux Kernel Functional Testing <lkft@...aro.org>
> Tested-by: Jon Hunter <jonathanh@...dia.com>
> Acked-by: Bjorn Helgaas <bhelgaas@...gle.com>
> ---
> Change from v1:
> - https://lore.kernel.org/all/20250827062911.203106-1-inochiama@gmail.com/
> 1. Apply Tested-by, Reported-by and Tested-by from original post [1].
> 2. update mistake in the comments.
>
> [1] https://lore.kernel.org/regressions/aK4O7Hl8NCVEMznB@monster/
> ---
> drivers/pci/msi/irqdomain.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/pci/msi/irqdomain.c b/drivers/pci/msi/irqdomain.c
> index 50ccac32f4cf..cbdc83c064d4 100644
> --- a/drivers/pci/msi/irqdomain.c
> +++ b/drivers/pci/msi/irqdomain.c
> @@ -154,6 +154,8 @@ static void cond_shutdown_parent(struct irq_data *data)
>
> if (unlikely(info->flags & MSI_FLAG_PCI_MSI_STARTUP_PARENT))
> irq_chip_shutdown_parent(data);
> + else if (unlikely(info->flags & MSI_FLAG_PCI_MSI_MASK_PARENT))
> + irq_chip_mask_parent(data);
> }
>
> static unsigned int cond_startup_parent(struct irq_data *data)
> @@ -162,6 +164,9 @@ static unsigned int cond_startup_parent(struct irq_data *data)
>
> if (unlikely(info->flags & MSI_FLAG_PCI_MSI_STARTUP_PARENT))
> return irq_chip_startup_parent(data);
> + else if (unlikely(info->flags & MSI_FLAG_PCI_MSI_MASK_PARENT))
> + irq_chip_unmask_parent(data);
> +
> return 0;
> }
>
> --
> 2.51.0
>
Please ignore this version, I generate this with wrong parameters
I will send a right v2.
Regards,
Inochi
Powered by blists - more mailing lists