[PATCH v2 3/5] genirq/msi: Move prepare() call to per-device allocation
Marc Zyngier
maz at kernel.org
Tue Jun 3 06:27:38 PDT 2025
On Tue, 03 Jun 2025 14:07:04 +0100,
Zenghui Yu <yuzenghui at huawei.com> wrote:
>
> Hi Marc,
>
> On 2025/6/3 20:50, Marc Zyngier wrote:
> > Hi Zenghui,
> >
> > On Tue, 03 Jun 2025 09:22:47 +0100,
> > Zenghui Yu <yuzenghui at huawei.com> wrote:
> > >
> > > > + domain->dev = dev;
> > > > + dev->msi.data->__domains[domid].domain = domain;
> > > > +
> > > > + if (msi_domain_prepare_irqs(domain, dev, hwsize, &bundle->alloc_info)) {
> > >
> > > Does it work for MSI? hwsize is 1 in the MSI case, without taking
> > > pci_msi_vec_count() into account.
> > >
> > > bool pci_setup_msi_device_domain(struct pci_dev *pdev)
> > > {
> > > [...]
> > >
> > > return pci_create_device_domain(pdev, &pci_msi_template, 1);
> >
> > Well spotted.
> >
> > This looks like a PCI bug ignoring Multi-MSI. Can you give the
> > following a go and let people know whether that fixes your issue?
>
> I hit this problem on Kunpeng920 with some HiSilicon SAS (Serial
> Attached SCSI controller) on it. These controllers are MSI-capable and
> didn't work after this commit.
That's interesting. It means that the sizing of the irqdomain to 1
wasn't getting in the way, even if that was obviously wrong. The funny
thing is that the msi_desc would still be OK, as we only have one for
MSI, no matter how many vectors are used.
>
> I have the exact same diff to get my box to work again ;-)
Ah ;-)
>
> Tested-by: Zenghui Yu <yuzenghui at huawei.com>
>
> Thanks for your fix!
Thank you!
M.
--
Jazz isn't dead. It just smells funny.
More information about the linux-arm-kernel
mailing list