diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2022-11-25 00:26:13 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2022-12-05 22:22:33 +0100 |
commit | 06bff9e347271566e8dd79e7c3eb971660209a00 (patch) | |
tree | c0c96e536d3fad62dafc7fb210f267a1a5791612 /include/linux/msi_api.h | |
parent | 4d5a4ccc519ab0a62e220dc8dcd8bc1c5f8fee10 (diff) |
genirq/msi: Provide struct msi_map
A simple struct to hold a MSI index / Linux interrupt number pair. It will
be returned from the dynamic vector allocation function and handed back to
the corresponding free() function.
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.326410494@linutronix.de
Diffstat (limited to 'include/linux/msi_api.h')
-rw-r--r-- | include/linux/msi_api.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/msi_api.h b/include/linux/msi_api.h index 8640171288a8..4cb7f4c9a3ae 100644 --- a/include/linux/msi_api.h +++ b/include/linux/msi_api.h @@ -18,6 +18,19 @@ enum msi_domain_ids { MSI_MAX_DEVICE_IRQDOMAINS, }; +/** + * msi_map - Mapping between MSI index and Linux interrupt number + * @index: The MSI index, e.g. slot in the MSI-X table or + * a software managed index if >= 0. If negative + * the allocation function failed and it contains + * the error code. + * @virq: The associated Linux interrupt number + */ +struct msi_map { + int index; + int virq; +}; + unsigned int msi_domain_get_virq(struct device *dev, unsigned int domid, unsigned int index); /** |