Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

genirq/msi: Provide constants for PCI/IMS support

Provide the necessary constants for PCI/IMS support:

- A new bus token for MSI irqdomain identification
- A MSI feature flag for the MSI irqdomains to signal support
- A secondary domain id

The latter expands the device internal domain pointer storage array from 1
to 2 entries. That extra pointer is mostly unused today, but the
alternative solutions would not be free either and would introduce more
complexity all over the place. Trade the 8bytes for simplicity.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221124232326.846169830@linutronix.de

+4
+1
include/linux/irqdomain_defs.h
··· 25 25 DOMAIN_BUS_PCI_DEVICE_MSIX, 26 26 DOMAIN_BUS_DMAR, 27 27 DOMAIN_BUS_AMDVI, 28 + DOMAIN_BUS_PCI_DEVICE_IMS, 28 29 }; 29 30 30 31 #endif /* _LINUX_IRQDOMAIN_DEFS_H */
+2
include/linux/msi.h
··· 559 559 MSI_FLAG_MSIX_CONTIGUOUS = (1 << 19), 560 560 /* PCI/MSI-X vectors can be dynamically allocated/freed post MSI-X enable */ 561 561 MSI_FLAG_PCI_MSIX_ALLOC_DYN = (1 << 20), 562 + /* Support for PCI/IMS */ 563 + MSI_FLAG_PCI_IMS = (1 << 21), 562 564 }; 563 565 564 566 /**
+1
include/linux/msi_api.h
··· 15 15 */ 16 16 enum msi_domain_ids { 17 17 MSI_DEFAULT_DOMAIN, 18 + MSI_SECONDARY_DOMAIN, 18 19 MSI_MAX_DEVICE_IRQDOMAINS, 19 20 }; 20 21