[PATCH RESEND v2] irqdomain: Restore block-wise Multi-MSI free semantics

Thomas Gleixner tglx at linutronix.de
Mon Nov 30 01:49:33 PST 2026


On Fri, Nov 27 2026 at 15:59, Chaoyong Zhou wrote:
> From: Chaoyong Zhou <zhouchaoyong at ruijie.com.cn>
>
> Please note: this is a resend from my personal mailbox
> (zhoucyfx at foxmail.com). The initial copy on 2026-11-25 was sent from my
> work address (zhouchaoyong at ruijie.com.cn) and reached you both, but our
> corporate mail gateway mangles outgoing mail into multipart/alternative
> (HTML), which the infradead list rejects with "550 Mailing lists do not
> accept HTML mail", so the list copies bounced twice. Sending via git
> send-email over this mailbox keeps the mail text/plain only.

How is that relevant for the change log? Put such information under the
"---" cutoff if at all. Nobody cares how about your email problems.

> Restore the pre-existing block-wise free semantics: when the whole
> range is consistently mapped, hand it down to the domains as a single
> block, exactly mirroring the allocation. Keep the per-interrupt
> fallback for inconsistent ranges, preserving the protection introduced
> by commit 4615fbc3788d ("genirq/irqdomain: Don't try to free an interrupt
> that has no mapping") for unwinding partially allocated ranges.
>
> Fixes: 4615fbc3788d ("genirq/irqdomain: Don't try to free an interrupt that has no mapping")

> The interrupts of a Multi-MSI descriptor are allocated from the MSI
> controllers as a single aligned block: the ITS (GICv3 and GICv5) and
> the Armada 370/XP drivers, amongst others, round the vector count up
> to a power of two and carve the region out of their per-device event
> bitmap with bitmap_find_free_region().
>
> Commit 4615fbc3788d ("genirq/irqdomain: Don't try to free an
> interrupt that has no mapping") changed irq_domain_free_irqs_hierarchy()
> to free the interrupts of a range one at a time, to protect against
> error paths trying to free interrupts that were never allocated.
>
> That changed the contract with the underlying domains: a Multi-MSI
> block is now released one interrupt at a time with nr_irqs == 1,
> which cannot unwind the aligned region the allocation created. The
> unused tail of the block is never released, leaving stale bits in the
> event bitmap. As a result the MSI device is never fully reclaimed
> (its_irq_domain_free() only mops up the device once its bitmap is
> empty), and re-probing the device fails to allocate the same number
> of vectors, silently degrading to a single MSI.
>
> This has been reported for GICv3 ITS:
>
> https://lore.kernel.org/all/20240708153933.GC5745@thinkpad/
>

Can you try:

    https://lore.kernel.org/87fqxbwla2.ffs@fw13

That should solve your problem along with some others which have been
reported.

Thanks,

        tglx



More information about the linux-arm-kernel mailing list