diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-12-06 23:51:07 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2021-12-16 22:22:17 +0100 |
commit | 0f62d941acf9ac3b6025692ce649b1f282b89e7f (patch) | |
tree | 15812104613cdf5f30ea1c14891114d41fc2094b /include/linux/msi.h | |
parent | b5f687f97d1e112493fe0447a1fb09fbd93c334b (diff) | |
download | linux-0f62d941acf9ac3b6025692ce649b1f282b89e7f.tar.gz linux-0f62d941acf9ac3b6025692ce649b1f282b89e7f.tar.bz2 linux-0f62d941acf9ac3b6025692ce649b1f282b89e7f.zip |
genirq/msi: Provide msi_domain_alloc/free_irqs_descs_locked()
Usage sites which do allocations of the MSI descriptors before invoking
msi_domain_alloc_irqs() require to lock the MSI decriptors accross the
operation.
Provide entry points which can be called with the MSI mutex held and lock
the mutex in the existing entry points.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Michael Kelley <mikelley@microsoft.com>
Tested-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20211206210747.765371053@linutronix.de
Diffstat (limited to 'include/linux/msi.h')
-rw-r--r-- | include/linux/msi.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/msi.h b/include/linux/msi.h index 2cf6c530588d..69c588efe85b 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -383,9 +383,12 @@ struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode, struct irq_domain *parent); int __msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, int nvec); +int msi_domain_alloc_irqs_descs_locked(struct irq_domain *domain, struct device *dev, + int nvec); int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, int nvec); void __msi_domain_free_irqs(struct irq_domain *domain, struct device *dev); +void msi_domain_free_irqs_descs_locked(struct irq_domain *domain, struct device *dev); void msi_domain_free_irqs(struct irq_domain *domain, struct device *dev); struct msi_domain_info *msi_get_domain_info(struct irq_domain *domain); |