mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH RFC v2 0/2] irqchip/ls-scfg-msi: add multi-MSI support
@ 2026-07-22  8:26 Alexander Wilhelm
  2026-07-22  8:26 ` [PATCH RFC v2 1/2] irqchip/ls-scfg-msi: refactor allocation to bitmap_find_free_region() Alexander Wilhelm
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alexander Wilhelm @ 2026-07-22  8:26 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-kernel

This series enables multi-MSI (nr_irqs > 1) allocation on the Layerscape
SCFG MSI controller so PCI endpoints that request contiguous MSI vector
blocks (for example ath12k, which asks for 16 vectors: 3 MHI + 5 CE + 8 DP)
no longer fall back to single-MSI operation with all interrupts multiplexed
onto one CPU.

The first patch is a preparation refactor: switch the hwirq bookkeeping
from find_first_zero_bit() / __set_bit() to bitmap_find_free_region() /
bitmap_release_region(), release the region on iommu_dma_prepare_msi()
error, and loop irq_domain_set_info() over nr_irqs. For the current
single-MSI case (order 0) this is functionally equivalent; the only
externally visible change is -ENOMEM instead of -ENOSPC on exhaustion.

The second patch enables MSI_FLAG_MULTI_PCI_MSI on the parent domain, drops
the WARN_ON(nr_irqs != 1) guard, and statically pins each MSIR's chained
parent IRQ to its matching CPU in no-affinity mode. That pinning is
required because affinity mode only releases every (1 << ibs_shift)-th
hwirq and cannot satisfy aligned power-of-two allocations of size > 1;
users of multi-MSI must therefore boot with lsmsi=no-affinity.

Signed-off-by: Alexander Wilhelm <alexander.wilhelm@westermo.com>
---
Changes in v2:
- Rebase on latest torvalds/master
- Adapt code to match kernel style guide
- Improve commit descriptions
- Use round-robin for MSIR distribution instead of ignoring the surplus
- Link to v1: https://lore.kernel.org/r/20260716-irqchip-ls-scfg-msi-add-multi-msi-support-v1-0-9795356d0ebc@westermo.com

---
Alexander Wilhelm (2):
      irqchip/ls-scfg-msi: refactor allocation to bitmap_find_free_region()
      irqchip/ls-scfg-msi: enable multi-MSI allocation

 drivers/irqchip/irq-ls-scfg-msi.c | 55 +++++++++++++++++++++++----------------
 1 file changed, 32 insertions(+), 23 deletions(-)
---
base-commit: 248951ddc14de84de3910f9b13f51491a8cd91df
change-id: 20260716-irqchip-ls-scfg-msi-add-multi-msi-support-5e7538460704

Best regards,
-- 
Alexander Wilhelm <alexander.wilhelm@westermo.com>


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

end of thread, other threads:[~2026-08-20  8:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-22  8:26 [PATCH RFC v2 0/2] irqchip/ls-scfg-msi: add multi-MSI support Alexander Wilhelm
2026-07-22  8:26 ` [PATCH RFC v2 1/2] irqchip/ls-scfg-msi: refactor allocation to bitmap_find_free_region() Alexander Wilhelm
2026-07-22  8:26 ` [PATCH RFC v2 2/2] irqchip/ls-scfg-msi: enable multi-MSI allocation Alexander Wilhelm
2026-08-20  8:01 ` [PATCH RFC v2 0/2] irqchip/ls-scfg-msi: add multi-MSI support Thomas Gleixner

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

all inboxes | Powered by JetHome®