* [PATCH] powerpc/pseries: Correct MSI allocation tracking
@ 2026-03-02 0:39 Nam Cao
2026-03-03 10:13 ` Nilay Shroff
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Nam Cao @ 2026-03-02 0:39 UTC (permalink / raw)
To: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, Nilay Shroff, linuxppc-dev, linux-kernel
Cc: Nam Cao, stable
The per-device MSI allocation calculation in pseries_irq_domain_alloc()
is clearly wrong. It can still happen to work when nr_irqs is 1.
Correct it.
Fixes: c0215e2d72de ("powerpc/pseries: Fix MSI-X allocation failure when quota is exceeded")
Cc: stable@vger.kernel.org
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
arch/powerpc/platforms/pseries/msi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
index 64ffc6476ad6..8285b9a29fbf 100644
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -605,7 +605,7 @@ static int pseries_irq_domain_alloc(struct irq_domain *domain, unsigned int virq
&pseries_msi_irq_chip, pseries_dev);
}
- pseries_dev->msi_used++;
+ pseries_dev->msi_used += nr_irqs;
return 0;
out:
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/pseries: Correct MSI allocation tracking
2026-03-02 0:39 [PATCH] powerpc/pseries: Correct MSI allocation tracking Nam Cao
@ 2026-03-03 10:13 ` Nilay Shroff
2026-03-03 13:49 ` Mahesh J Salgaonkar
2026-03-11 2:14 ` Madhavan Srinivasan
2 siblings, 0 replies; 4+ messages in thread
From: Nilay Shroff @ 2026-03-03 10:13 UTC (permalink / raw)
To: Nam Cao, Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, linuxppc-dev, linux-kernel
Cc: stable
On 3/2/26 6:09 AM, Nam Cao wrote:
> The per-device MSI allocation calculation in pseries_irq_domain_alloc()
> is clearly wrong. It can still happen to work when nr_irqs is 1.
>
> Correct it.
>
> Fixes: c0215e2d72de ("powerpc/pseries: Fix MSI-X allocation failure when quota is exceeded")
> Cc: stable@vger.kernel.org
> Signed-off-by: Nam Cao <namcao@linutronix.de>
> ---
> arch/powerpc/platforms/pseries/msi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
> index 64ffc6476ad6..8285b9a29fbf 100644
> --- a/arch/powerpc/platforms/pseries/msi.c
> +++ b/arch/powerpc/platforms/pseries/msi.c
> @@ -605,7 +605,7 @@ static int pseries_irq_domain_alloc(struct irq_domain *domain, unsigned int virq
> &pseries_msi_irq_chip, pseries_dev);
> }
>
> - pseries_dev->msi_used++;
> + pseries_dev->msi_used += nr_irqs;
> return 0;
>
> out:
Looks good to me:
Reviewed-by : Nilay Shroff <nilay@linux.ibm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/pseries: Correct MSI allocation tracking
2026-03-02 0:39 [PATCH] powerpc/pseries: Correct MSI allocation tracking Nam Cao
2026-03-03 10:13 ` Nilay Shroff
@ 2026-03-03 13:49 ` Mahesh J Salgaonkar
2026-03-11 2:14 ` Madhavan Srinivasan
2 siblings, 0 replies; 4+ messages in thread
From: Mahesh J Salgaonkar @ 2026-03-03 13:49 UTC (permalink / raw)
To: Nam Cao
Cc: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, Nilay Shroff, linuxppc-dev, linux-kernel,
stable
On 2026-03-02 01:39:48 Mon, Nam Cao wrote:
> The per-device MSI allocation calculation in pseries_irq_domain_alloc()
> is clearly wrong. It can still happen to work when nr_irqs is 1.
>
> Correct it.
>
> Fixes: c0215e2d72de ("powerpc/pseries: Fix MSI-X allocation failure when quota is exceeded")
> Cc: stable@vger.kernel.org
> Signed-off-by: Nam Cao <namcao@linutronix.de>
> ---
> arch/powerpc/platforms/pseries/msi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
> index 64ffc6476ad6..8285b9a29fbf 100644
> --- a/arch/powerpc/platforms/pseries/msi.c
> +++ b/arch/powerpc/platforms/pseries/msi.c
> @@ -605,7 +605,7 @@ static int pseries_irq_domain_alloc(struct irq_domain *domain, unsigned int virq
> &pseries_msi_irq_chip, pseries_dev);
> }
>
> - pseries_dev->msi_used++;
> + pseries_dev->msi_used += nr_irqs;
Yeah, msi_used was wronlgy incremented only once while allocating
nr_irqs interrupts from parent domain. Looks good to me.
Reviewed-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
Thanks,
-Mahesh.
> return 0;
>
> out:
> --
> 2.47.3
>
--
Mahesh J Salgaonkar
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/pseries: Correct MSI allocation tracking
2026-03-02 0:39 [PATCH] powerpc/pseries: Correct MSI allocation tracking Nam Cao
2026-03-03 10:13 ` Nilay Shroff
2026-03-03 13:49 ` Mahesh J Salgaonkar
@ 2026-03-11 2:14 ` Madhavan Srinivasan
2 siblings, 0 replies; 4+ messages in thread
From: Madhavan Srinivasan @ 2026-03-11 2:14 UTC (permalink / raw)
To: Michael Ellerman, Nicholas Piggin, Christophe Leroy, Nilay Shroff,
linuxppc-dev, linux-kernel, Nam Cao
Cc: stable
On Mon, 02 Mar 2026 01:39:48 +0100, Nam Cao wrote:
> The per-device MSI allocation calculation in pseries_irq_domain_alloc()
> is clearly wrong. It can still happen to work when nr_irqs is 1.
>
> Correct it.
>
>
Applied to powerpc/fixes.
[1/1] powerpc/pseries: Correct MSI allocation tracking
https://git.kernel.org/powerpc/c/35e4f2a17eb40288f9bcdb09549fa04a63a96279
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-03-11 2:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-02 0:39 [PATCH] powerpc/pseries: Correct MSI allocation tracking Nam Cao
2026-03-03 10:13 ` Nilay Shroff
2026-03-03 13:49 ` Mahesh J Salgaonkar
2026-03-11 2:14 ` Madhavan Srinivasan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox