[PATCH 3/6] irqchip/gic-v3-its: Add fsl_mc device plumbing to the msi-parent handling

Marc Zyngier posted 6 patches 1 month, 1 week ago
[PATCH 3/6] irqchip/gic-v3-its: Add fsl_mc device plumbing to the msi-parent handling
Posted by Marc Zyngier 1 month, 1 week ago
Make the ITS code aware of fsl_mc devices by plumbing the devid
retrieval primitive.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/irqchip/irq-gic-its-msi-parent.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-gic-its-msi-parent.c b/drivers/irqchip/irq-gic-its-msi-parent.c
index 12f45228c8674..532c0d626ca04 100644
--- a/drivers/irqchip/irq-gic-its-msi-parent.c
+++ b/drivers/irqchip/irq-gic-its-msi-parent.c
@@ -7,6 +7,7 @@
 #include <linux/acpi_iort.h>
 #include <linux/of_address.h>
 #include <linux/pci.h>
+#include <linux/fsl/mc.h>
 
 #include "irq-gic-its-msi-parent.h"
 #include <linux/irqchip/irq-msi-lib.h>
@@ -186,9 +187,11 @@ static int its_pmsi_prepare(struct irq_domain *domain, struct device *dev,
 {
 	struct msi_domain_info *msi_info;
 	u32 dev_id;
-	int ret;
+	int ret = 0;
 
-	if (dev->of_node)
+	if (dev_is_fsl_mc(dev))
+		dev_id = fsl_mc_get_msi_id(dev);
+	else if (dev->of_node)
 		ret = of_pmsi_get_msi_info(domain->parent, dev, &dev_id, NULL);
 	else
 		ret = iort_pmsi_get_dev_id(dev, &dev_id);
-- 
2.47.3
Re: [PATCH 3/6] irqchip/gic-v3-its: Add fsl_mc device plumbing to the msi-parent handling
Posted by Thomas Gleixner 1 month, 1 week ago
On Wed, Feb 18 2026 at 13:52, Marc Zyngier wrote:
> Make the ITS code aware of fsl_mc devices by plumbing the devid
> retrieval primitive.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
>  drivers/irqchip/irq-gic-its-msi-parent.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-gic-its-msi-parent.c b/drivers/irqchip/irq-gic-its-msi-parent.c
> index 12f45228c8674..532c0d626ca04 100644
> --- a/drivers/irqchip/irq-gic-its-msi-parent.c
> +++ b/drivers/irqchip/irq-gic-its-msi-parent.c
> @@ -7,6 +7,7 @@
>  #include <linux/acpi_iort.h>
>  #include <linux/of_address.h>
>  #include <linux/pci.h>
> +#include <linux/fsl/mc.h>
>  
>  #include "irq-gic-its-msi-parent.h"
>  #include <linux/irqchip/irq-msi-lib.h>
> @@ -186,9 +187,11 @@ static int its_pmsi_prepare(struct irq_domain *domain, struct device *dev,
>  {
>  	struct msi_domain_info *msi_info;
>  	u32 dev_id;
> -	int ret;
> +	int ret = 0;
>  
> -	if (dev->of_node)
> +	if (dev_is_fsl_mc(dev))
> +		dev_id = fsl_mc_get_msi_id(dev);
> +	else if (dev->of_node)
>  		ret = of_pmsi_get_msi_info(domain->parent, dev, &dev_id, NULL);
>  	else
>  		ret = iort_pmsi_get_dev_id(dev, &dev_id);

This rejects as you are building against an unmerged change (I assume
it's Lorenzos GIC5 stuff). I can fix it up when applying.

Thanks,

        tglx
Re: [PATCH 3/6] irqchip/gic-v3-its: Add fsl_mc device plumbing to the msi-parent handling
Posted by Marc Zyngier 1 month, 1 week ago
On Sun, 22 Feb 2026 22:57:44 +0000,
Thomas Gleixner <tglx@kernel.org> wrote:
> 
> On Wed, Feb 18 2026 at 13:52, Marc Zyngier wrote:
> > Make the ITS code aware of fsl_mc devices by plumbing the devid
> > retrieval primitive.
> >
> > Signed-off-by: Marc Zyngier <maz@kernel.org>
> > ---
> >  drivers/irqchip/irq-gic-its-msi-parent.c | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/irqchip/irq-gic-its-msi-parent.c b/drivers/irqchip/irq-gic-its-msi-parent.c
> > index 12f45228c8674..532c0d626ca04 100644
> > --- a/drivers/irqchip/irq-gic-its-msi-parent.c
> > +++ b/drivers/irqchip/irq-gic-its-msi-parent.c
> > @@ -7,6 +7,7 @@
> >  #include <linux/acpi_iort.h>
> >  #include <linux/of_address.h>
> >  #include <linux/pci.h>
> > +#include <linux/fsl/mc.h>
> >  
> >  #include "irq-gic-its-msi-parent.h"
> >  #include <linux/irqchip/irq-msi-lib.h>
> > @@ -186,9 +187,11 @@ static int its_pmsi_prepare(struct irq_domain *domain, struct device *dev,
> >  {
> >  	struct msi_domain_info *msi_info;
> >  	u32 dev_id;
> > -	int ret;
> > +	int ret = 0;
> >  
> > -	if (dev->of_node)
> > +	if (dev_is_fsl_mc(dev))
> > +		dev_id = fsl_mc_get_msi_id(dev);
> > +	else if (dev->of_node)
> >  		ret = of_pmsi_get_msi_info(domain->parent, dev, &dev_id, NULL);
> >  	else
> >  		ret = iort_pmsi_get_dev_id(dev, &dev_id);
> 
> This rejects as you are building against an unmerged change (I assume
> it's Lorenzos GIC5 stuff). I can fix it up when applying.

That was against vanilla 6.19. I'll rebase on -rc1 to satisfy myself
that this is still doing the right thing after the ACPI crap fest, and
repost the result.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.
Re: [PATCH 3/6] irqchip/gic-v3-its: Add fsl_mc device plumbing to the msi-parent handling
Posted by Thomas Gleixner 1 month, 1 week ago
On Mon, Feb 23 2026 at 09:01, Marc Zyngier wrote:
> On Sun, 22 Feb 2026 22:57:44 +0000,
> Thomas Gleixner <tglx@kernel.org> wrote:
>> This rejects as you are building against an unmerged change (I assume
>> it's Lorenzos GIC5 stuff). I can fix it up when applying.
>
> That was against vanilla 6.19. I'll rebase on -rc1 to satisfy myself
> that this is still doing the right thing after the ACPI crap fest, and
> repost the result.

Ah. The other way round :)

My resolution is simple and it looks about right. Please note the
cosmetic changes I did on the way :)

Thanks,

        tglx
---
--- a/drivers/irqchip/irq-gic-its-msi-parent.c
+++ b/drivers/irqchip/irq-gic-its-msi-parent.c
@@ -5,6 +5,7 @@
 // Copyright (C) 2022 Intel
 
 #include <linux/acpi_iort.h>
+#include <linux/fsl/mc.h>
 #include <linux/of_address.h>
 #include <linux/pci.h>
 
@@ -186,10 +187,12 @@ static int its_pmsi_prepare(struct irq_d
 			    int nvec, msi_alloc_info_t *info)
 {
 	struct msi_domain_info *msi_info;
+	int ret = 0;
 	u32 dev_id;
-	int ret;
 
-	if (dev->of_node)
+	if (dev_is_fsl_mc(dev))
+		dev_id = fsl_mc_get_msi_id(dev);
+	else if (dev->of_node)
 		ret = of_pmsi_get_msi_info(domain->parent, dev, &dev_id, NULL);
 	else
 		ret = iort_pmsi_get_msi_info(dev, &dev_id, NULL);
Re: [PATCH 3/6] irqchip/gic-v3-its: Add fsl_mc device plumbing to the msi-parent handling
Posted by Marc Zyngier 1 month, 1 week ago
On Mon, 23 Feb 2026 13:02:50 +0000,
Thomas Gleixner <tglx@kernel.org> wrote:
> 
> On Mon, Feb 23 2026 at 09:01, Marc Zyngier wrote:
> > On Sun, 22 Feb 2026 22:57:44 +0000,
> > Thomas Gleixner <tglx@kernel.org> wrote:
> >> This rejects as you are building against an unmerged change (I assume
> >> it's Lorenzos GIC5 stuff). I can fix it up when applying.
> >
> > That was against vanilla 6.19. I'll rebase on -rc1 to satisfy myself
> > that this is still doing the right thing after the ACPI crap fest, and
> > repost the result.
> 
> Ah. The other way round :)
> 
> My resolution is simple and it looks about right. Please note the
> cosmetic changes I did on the way :)

Yup, looks good to me. And yes, moving the include up is the right
thing to do.

I have another small change in my current stack that also drops
DOMAIN_BUS_FSL_MC_MSI from include/linux/irqdomain_defs.h. Could be
folded into patch #5.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.
Re: [PATCH 3/6] irqchip/gic-v3-its: Add fsl_mc device plumbing to the msi-parent handling
Posted by Thomas Gleixner 1 month, 1 week ago
On Mon, Feb 23 2026 at 13:22, Marc Zyngier wrote:
> On Mon, 23 Feb 2026 13:02:50 +0000,
> Thomas Gleixner <tglx@kernel.org> wrote:
>> 
>> On Mon, Feb 23 2026 at 09:01, Marc Zyngier wrote:
>> > On Sun, 22 Feb 2026 22:57:44 +0000,
>> > Thomas Gleixner <tglx@kernel.org> wrote:
>> >> This rejects as you are building against an unmerged change (I assume
>> >> it's Lorenzos GIC5 stuff). I can fix it up when applying.
>> >
>> > That was against vanilla 6.19. I'll rebase on -rc1 to satisfy myself
>> > that this is still doing the right thing after the ACPI crap fest, and
>> > repost the result.
>> 
>> Ah. The other way round :)
>> 
>> My resolution is simple and it looks about right. Please note the
>> cosmetic changes I did on the way :)
>
> Yup, looks good to me. And yes, moving the include up is the right
> thing to do.
>
> I have another small change in my current stack that also drops
> DOMAIN_BUS_FSL_MC_MSI from include/linux/irqdomain_defs.h. Could be
> folded into patch #5.

Just resend the pile.