Re: pcie-iproc-msi.c: Bug in Multi-MSI support?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 6/4/2021 2:17 AM, Sandor Bodo-Merle wrote:
> Would something like this work on top of the previous patch - or it
> needs more checks,
> like the "nr_irqs" iniproc_msi_irq_domain_alloc() ?
> 
> diff --git drivers/pci/controller/pcie-iproc-msi.c
> drivers/pci/controller/pcie-iproc-msi.c
> index eede4e8f3f75..49e9d1a761ff 100644
> --- drivers/pci/controller/pcie-iproc-msi.c
> +++ drivers/pci/controller/pcie-iproc-msi.c
> @@ -171,7 +171,7 @@ static struct irq_chip iproc_msi_irq_chip = {
> 
>  static struct msi_domain_info iproc_msi_domain_info = {
>         .flags = MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
> -               MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX,
> +              MSI_FLAG_PCI_MSIX,
>         .chip = &iproc_msi_irq_chip,
>  };
> 
> @@ -539,6 +539,9 @@ int iproc_msi_init(struct iproc_pcie *pcie, struct
> device_node *node)
>         mutex_init(&msi->bitmap_lock);
>         msi->nr_cpus = num_possible_cpus();
> 
> +       if (msi->nr_cpus == 1)
> +               iproc_msi_domain_info.flags |=  MSI_FLAG_MULTI_PCI_MSI;
> +

That looks right to me. Please also add comments to explain we cannot
support multi-msi and msi affinity at the same time.

Thanks.

>         msi->nr_irqs = of_irq_count(node);
>         if (!msi->nr_irqs) {
>                 dev_err(pcie->dev, "found no MSI GIC interrupt\n");
> 

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux