genirq: s390/pci: Migrate MSI interrupts to irqdomain API
Get series with b4
b4 am [email protected] change-id 20251104-implement-msi-domain-dc1ea014580eVersions newest first
- v9 Latest2 patches 3 repliesIn review
- v82 patches 2 repliesSuperseded
- v72 patches 8 repliesSuperseded
Earlier versions · 6
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v6 | 2 patches | 7 replies | Superseded | |
| v5 | 2 patches | 6 replies | Superseded | |
| v4 | 2 patches | 3 replies | Superseded | |
| v3 | 2 patches | 3 replies | Superseded | |
| v2 | 2 patches | 5 replies | Superseded | |
| v1 | 2 patches | 2 replies | Superseded |
Changes in v9 from the cover letter
- abstract airq cleanup into separate function to improve readability
- Link to v8: https://lore.kernel.org/r/[email protected]
Patches in v9 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | genirq: Change hwirq parameter to irq_hw_number_tinclude/ kernel/ | +6 | 0 replies | |
| 2/2 | s390/pci: Migrate s390 IRQ logic to IRQ domain APIarch/ arch/ arch/ +2 more | +247 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Thomas Gleixner | Niklas Schnelle | Farhan Ali | Gerd Bayer |
|---|---|---|---|---|
| 1/2 | R-b | R-b | R-b | |
| 2/2 | R-b | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v9 0/2] genirq: s390/pci: Migrate MSI interrupts to irqdomain API
This patch series reworks the PCIe interrupt handling on s390 by migrating it to use a proper MSI parent domain. Introducing a dedicated MSI domain hierarchy aligns s390 PCIe support with the generic Linux IRQ domain model. Currently s390 is one of the last architectures still using the legacy API.
The migration splits the existing code in the legacy functions arch_setup_msi_irqs() and arch_teardown_msi_irqs() into different callbacks of the newly created MSI parent domain:
- zpci_msi_prepare(): prepare the allocation of per-device MSI IRQs. will be called once for each device before allocating individual IRQs and sets up for example the adapter aisb and aibv.
- zpci_msi_teardown(): reverts the effects of zpci_msi_prepare() and is called after all MSI IRQs are freed.
- zpci_msi_domain_alloc(): the allocation function for interrupts
- zpci_msi_domain_free(): revert the effects of zpci_msi_domain_alloc()
- zpci_compose_msi_msg(): create the MSI message to be written into the corresponding PCI config space.
* Patch 1 fixes an inconsistency in the irqdomain API. Internally, hw irqs are represented by an unsigned long int (irq_hw_number_t) while the external API in some cases takes an unsigned int as parameter. This fix was required in V2 of the patchset. Due to conceptual changes in patch 2 it is not required anymore for s390, but still seems sensible.
* Patch 2 implements IRQ domains for s390 PCI
Since patch 1 changes common APIs, some build tests were done for x86_64 and arm64.
---
Changes in v9:
- abstract airq cleanup into separate function to improve readability
- Link to v8: https://lore.kernel.org/r/[email protected]
Changes in v8:
- Change parameter of zpci_decode_hwirq_msi_index to irq_hw_number_t
- clear airq data and ptr field in zpci_msi_domain_free()
- Collect R-b from Niklas and Farhan since there are only minor changes
- Link to v7: https://lore.kernel.org/r/[email protected]
Changes in v7:
- call zpci_set_irq() in zpci_reenable_device() to fix recovery after
zpcictl --reset-fw
- add commas at end of initializers
- remove unused variables in free()
- removed R-b for patch 2 because of bug fixes
- Link to v6: https://lore.kernel.org/r/[email protected]
Changes in v6:
- removed obsolete function zpci_decode_hwirq_msi_index()
- removed some code duplication
- fixed some coding style issues
- corrected hwirq encoding in commit message
- Link to v5: https://lore.kernel.org/r/[email protected]
Changes in v5:
- removed two lines of superfluous code
- Link to v4: https://lore.kernel.org/r/[email protected]
Changes in v4:
- remove flag MSI_FLAG_PCI_MSI_MASK_PARENT and mask/unmask callbacks
- use goto statements in zpci_bus_create_pci_bus()
- Link to v3: https://lore.kernel.org/r/[email protected]
Changes in v3:
- implement one MSI parent domain per PCI domain to further align the
implementation with other architectures.
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- fix directed interrupt setup and handling
- add flag MSI_FLAG_NO_AFFINITY in case of floating interrupts
- style adjustments according to review comments
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Tobias Schumacher (2):
genirq: Change hwirq parameter to irq_hw_number_t s390/pci: Migrate s390 IRQ logic to IRQ domain API
arch/s390/Kconfig | 1 + arch/s390/include/asm/pci.h | 5 + arch/s390/pci/pci.c | 6 + arch/s390/pci/pci_bus.c | 18 ++- arch/s390/pci/pci_irq.c | 332 +++++++++++++++++++++++++++++--------------- include/linux/irqdesc.h | 6 +- kernel/irq/irqdesc.c | 6 +- 7 files changed, 253 insertions(+), 121 deletions(-)
---
base-commit: 82ef9f0fac73cca3e7d776b095b5a7de1b0b88fc
change-id: 20251104-implement-msi-domain-dc1ea014580e
Best regards,
Signature · 1 line
Tobias Schumacher <[email protected]>