Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Michael Wu <michael@allwinnertech.com>, Marc Zyngier <maz@kernel.org>
Cc: lpieralisi@kernel.org, kw@linux.com, mani@kernel.org,
	robh@kernel.org, bhelgaas@google.com, linux-pci@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: Fwd: PCIe msi bitmap issue by split nr_irqs for 1 by 1
Date: Thu, 6 Nov 2025 14:21:12 -0600	[thread overview]
Message-ID: <20251106202112.GA1966401@bhelgaas> (raw)
In-Reply-To: <610ad0fd-cc5a-f19d-77de-c565449f1c5e@allwinnertech.com>

[+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.

      reply	other threads:[~2025-11-06 20:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251106202112.GA1966401@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=maz@kernel.org \
    --cc=michael@allwinnertech.com \
    --cc=robh@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox