summaryrefslogtreecommitdiff
path: root/include/linux/msi.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2022-11-25 02:24:20 +0300
committerThomas Gleixner <tglx@linutronix.de>2022-12-05 21:20:59 +0300
commitf1139f905bd2d8bec59be0c1404b592279ae0ac9 (patch)
tree6e83552b1e2d3e478027587f84050d6c06089598 /include/linux/msi.h
parent3e86a3a3ed031dd498e614db0fa082a58d700df9 (diff)
downloadlinux-f1139f905bd2d8bec59be0c1404b592279ae0ac9.tar.xz
genirq/msi: Move xarray into a separate struct and create an array
The upcoming support for multiple MSI domains per device requires storage for the MSI descriptors and in a second step storage for the irqdomain pointers. Move the xarray into a separate data structure msi_dev_domain and create an array with size 1 in msi_device_data, which can be expanded later when the support for per device domains is implemented. 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/20221124230313.864887773@linutronix.de
Diffstat (limited to 'include/linux/msi.h')
-rw-r--r--include/linux/msi.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/msi.h b/include/linux/msi.h
index 9f72494dcc3e..f7b9c41a4f54 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -173,19 +173,28 @@ enum msi_desc_filter {
MSI_DESC_ASSOCIATED,
};
+
+/**
+ * struct msi_dev_domain - The internals of MSI domain info per device
+ * @store: Xarray for storing MSI descriptor pointers
+ */
+struct msi_dev_domain {
+ struct xarray store;
+};
+
/**
* msi_device_data - MSI per device data
* @properties: MSI properties which are interesting to drivers
* @platform_data: Platform-MSI specific data
* @mutex: Mutex protecting the MSI descriptor store
- * @__store: Xarray for storing MSI descriptor pointers
+ * @__domains: Internal data for per device MSI domains
* @__iter_idx: Index to search the next entry for iterators
*/
struct msi_device_data {
unsigned long properties;
struct platform_msi_priv_data *platform_data;
struct mutex mutex;
- struct xarray __store;
+ struct msi_dev_domain __domains[MSI_MAX_DEVICE_IRQDOMAINS];
unsigned long __iter_idx;
};