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 <[email protected]>
---
include/linux/msi_api.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
--- 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);
/**
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 055b6b34405d0c064a3dbd2531c8fef60a64e059
Gitweb: https://git.kernel.org/tip/055b6b34405d0c064a3dbd2531c8fef60a64e059
Author: Thomas Gleixner <[email protected]>
AuthorDate: Fri, 25 Nov 2022 00:26:13 +01:00
Committer: Thomas Gleixner <[email protected]>
CommitterDate: Mon, 05 Dec 2022 19:21:03 +01:00
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 <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
include/linux/msi_api.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/include/linux/msi_api.h b/include/linux/msi_api.h
index 8640171..4cb7f4c 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);
/**
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 06bff9e347271566e8dd79e7c3eb971660209a00
Gitweb: https://git.kernel.org/tip/06bff9e347271566e8dd79e7c3eb971660209a00
Author: Thomas Gleixner <[email protected]>
AuthorDate: Fri, 25 Nov 2022 00:26:13 +01:00
Committer: Thomas Gleixner <[email protected]>
CommitterDate: Mon, 05 Dec 2022 22:22:33 +01:00
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 <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
include/linux/msi_api.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/include/linux/msi_api.h b/include/linux/msi_api.h
index 8640171..4cb7f4c 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);
/**