RE: [PATCH v4] cdx: add MSI support for CDX bus

From: Gangurde, Abhijit
Date: Tue Oct 17 2023 - 07:24:41 EST


> > +}
> > +
> > +static struct irq_chip cdx_msi_irq_chip = {
> > + .name = "CDX-MSI",
> > + .irq_mask = irq_chip_mask_parent,
> > + .irq_unmask = irq_chip_unmask_parent,
> > + .irq_eoi = irq_chip_eoi_parent,
> > + .irq_set_affinity = msi_domain_set_affinity,
> > + .irq_write_msi_msg = cdx_msi_write_msg,
> > + .irq_bus_lock = cdx_msi_write_irq_lock,
> > + .irq_bus_sync_unlock = cdx_msi_write_irq_unlock
> > +};
> > +
> > +int cdx_msi_domain_alloc_irqs(struct device *dev, unsigned int irq_count)
> > +{
> > + int ret;
> > +
> > + ret = msi_setup_device_data(dev);
> > + if (ret)
> > + return ret;
> > +
> > + ret = msi_domain_alloc_irqs_range(dev, MSI_DEFAULT_DOMAIN,
> > + 0, irq_count - 1);
> > + if (ret)
> > + dev_err(dev, "Failed to allocate IRQs: %d\n", ret);
> > +
> > + return ret;
> > +}
> > +EXPORT_SYMBOL_GPL(cdx_msi_domain_alloc_irqs);
>
> meta-comment, CDX really should have a module namespace one of these
> days, right?
>

Will include the module namespace change in other cdx patch series.

Thanks,
Abhijit