Linux PCI subsystem development
 help / color / mirror / Atom feed
* Fwd: PCIe msi bitmap issue by split nr_irqs for 1 by 1
       [not found] <89809140-413e-9b31-6a2a-99be98628e62@allwinnertech.com>
@ 2025-11-06  5:29 ` Michael Wu
  2025-11-06 20:21   ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Wu @ 2025-11-06  5:29 UTC (permalink / raw)
  To: lpieralisi, kw, mani, robh, bhelgaas; +Cc: linux-pci, maz

Hi Dear linux-pci team,

I got some msi-irq bitmap issue when using PCIe NVMe SSD during 
resume/suspend.

First, we know now all the controller driver using "order_base_2()" to 
find the bitmap in alloc/free.

Then in my case, SSD request for 9 msi-irqs, and 16 bits is occupy in 
bitmap[31:16].
Eg. msi_bitmap from 00000001 to ffff0001.

When in suspend, msi-irqs will be free one by one, but not 9 in one 
time. This will cause bitmap cannot fully clear which was requested, 
bit[24:16] will be free, but bit[31:25] was residue.
Eg. msi_bitmap from ffff0001 to fffe0001(1st) to fffc0001(2nd) to ... to 
fe000001(9th)

And I found that this "split" operation was push in below commit:
4615fbc3788d ("genirq/irqdomain: Don't try to free an interrupt that has 
no mapping")

After i revert it, everything goes normal.

So at last, is there any solution to fix it?

-- 
Regards,
Michael Wu

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fwd: PCIe msi bitmap issue by split nr_irqs for 1 by 1
  2025-11-06  5:29 ` Fwd: PCIe msi bitmap issue by split nr_irqs for 1 by 1 Michael Wu
@ 2025-11-06 20:21   ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2025-11-06 20:21 UTC (permalink / raw)
  To: Michael Wu, Marc Zyngier
  Cc: lpieralisi, kw, mani, robh, bhelgaas, linux-pci, Thomas Gleixner

[+to Marc, author of 4615fbc3788d ("genirq/irqdomain: Don't try to
free an interrupt that has no mapping");
+cc Thomas]

On Thu, Nov 06, 2025 at 01:29:12PM +0800, Michael Wu wrote:
> Hi Dear linux-pci team,
> 
> I got some msi-irq bitmap issue when using PCIe NVMe SSD during
> resume/suspend.
> 
> First, we know now all the controller driver using "order_base_2()" to find
> the bitmap in alloc/free.
> 
> Then in my case, SSD request for 9 msi-irqs, and 16 bits is occupy in
> bitmap[31:16].
> Eg. msi_bitmap from 00000001 to ffff0001.
> 
> When in suspend, msi-irqs will be free one by one, but not 9 in one time.
> This will cause bitmap cannot fully clear which was requested, bit[24:16]
> will be free, but bit[31:25] was residue.
> Eg. msi_bitmap from ffff0001 to fffe0001(1st) to fffc0001(2nd) to ... to
> fe000001(9th)
> 
> And I found that this "split" operation was push in below commit:
> 4615fbc3788d ("genirq/irqdomain: Don't try to free an interrupt that has no
> mapping")
> 
> After i revert it, everything goes normal.

Thanks for the report, Michael.  Looks like the same issue reported
here:

  https://lore.kernel.org/all/cc224272-15db-968b-46a0-95951e11b23f@huawei.com/
  https://lore.kernel.org/all/20230720122429.4123447-1-zhanjie9@hisilicon.com/

I see a workaround there, but it doesn't look like anything ever made
it upstream.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-06 20:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <89809140-413e-9b31-6a2a-99be98628e62@allwinnertech.com>
2025-11-06  5:29 ` Fwd: PCIe msi bitmap issue by split nr_irqs for 1 by 1 Michael Wu
2025-11-06 20:21   ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox