linux/drivers/pci/msi
Thomas Gleixner 73bd063ca0 PCI/MSI: Provide prepare_desc() MSI domain op
The setup of MSI descriptors for PCI/MSI-X interrupts depends partially on
the MSI index for which the descriptor is initialized.

Dynamic MSI-X vector allocation post MSI-X enablement allows to allocate
vectors at a given index or at any free index in the available table
range. The latter requires that the descriptor is initialized after the
MSI core has chosen an index.

Implement the prepare_desc() op in the PCI/MSI-X specific msi_domain_ops
which is invoked before the core interrupt descriptor and the associated
Linux interrupt number is allocated.

That callback is also provided for the upcoming PCI/IMS implementations so
the implementation specific interrupt domain can do their domain specific
initialization of the MSI descriptors.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221124232326.673658806@linutronix.de
2022-12-05 22:22:34 +01:00
..
api.c PCI/MSI: Use bullet lists in kernel-doc comments of api.c 2022-12-05 18:57:46 +01:00
irqdomain.c PCI/MSI: Provide prepare_desc() MSI domain op 2022-12-05 22:22:34 +01:00
legacy.c PCI/MSI: Prevent UAF in error path 2022-01-21 02:14:46 +01:00
Makefile PCI/MSI: Move pci_disable_msi() to api.c 2022-11-17 15:15:20 +01:00
msi.c PCI/MSI: Split MSI-X descriptor setup 2022-12-05 22:22:34 +01:00
msi.h PCI/MSI: Split MSI-X descriptor setup 2022-12-05 22:22:34 +01:00
pcidev_msi.c