aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2021-12-10 23:19:23 +0100
committerThomas Gleixner <[email protected]>2021-12-16 22:16:40 +0100
commitcf15f43acaad31dabb2646cef170a506a1d663eb (patch)
treeedf03c996e5ceb82d3523f4494ae581fb7d8107e /include
parent651b39c48813acac2b77850014390f4062a4835d (diff)
genirq/msi: Provide interface to retrieve Linux interrupt number
This allows drivers to retrieve the Linux interrupt number instead of fiddling with MSI descriptors. msi_get_virq() returns the Linux interrupt number or 0 in case that there is no entry for the given MSI index. Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Michael Kelley <[email protected]> Tested-by: Nishanth Menon <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include')
-rw-r--r--include/linux/msi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/msi.h b/include/linux/msi.h
index d206239e6fa8..7593fc383dba 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -153,6 +153,8 @@ struct msi_device_data {
int msi_setup_device_data(struct device *dev);
+unsigned int msi_get_virq(struct device *dev, unsigned int index);
+
/* Helpers to hide struct msi_desc implementation details */
#define msi_desc_to_dev(desc) ((desc)->dev)
#define dev_to_msi_list(dev) (&(dev)->msi_list)