diff options
author | Ahmed S. Darwish <darwi@linutronix.de> | 2022-11-25 02:24:25 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2022-12-05 21:20:59 +0300 |
commit | 98043704f375f63a47efeff123ab92fcf34b95e6 (patch) | |
tree | bfd99427ae4b49600816585cfb0a2d089c0e5781 /include/linux/msi_api.h | |
parent | 94ff94cfea2827e287a42781a47f37c9ef82186b (diff) | |
download | linux-98043704f375f63a47efeff123ab92fcf34b95e6.tar.xz |
genirq/msi: Make msi_get_virq() device domain aware
In preparation of the upcoming per device multi MSI domain support, change
the interface to support lookups based on domain id and zero based index
within the domain.
Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
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/20221124230314.044613697@linutronix.de
Diffstat (limited to 'include/linux/msi_api.h')
-rw-r--r-- | include/linux/msi_api.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/msi_api.h b/include/linux/msi_api.h index 4dbbce68a217..8640171288a8 100644 --- a/include/linux/msi_api.h +++ b/include/linux/msi_api.h @@ -18,6 +18,18 @@ enum msi_domain_ids { MSI_MAX_DEVICE_IRQDOMAINS, }; -unsigned int msi_get_virq(struct device *dev, unsigned int index); +unsigned int msi_domain_get_virq(struct device *dev, unsigned int domid, unsigned int index); + +/** + * msi_get_virq - Lookup the Linux interrupt number for a MSI index on the default interrupt domain + * @dev: Device for which the lookup happens + * @index: The MSI index to lookup + * + * Return: The Linux interrupt number on success (> 0), 0 if not found + */ +static inline unsigned int msi_get_virq(struct device *dev, unsigned int index) +{ + return msi_domain_get_virq(dev, MSI_DEFAULT_DOMAIN, index); +} #endif |