summaryrefslogtreecommitdiff
path: root/include/linux/msi.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2021-12-07 01:51:04 +0300
committerThomas Gleixner <tglx@linutronix.de>2021-12-17 00:22:16 +0300
commit125282cd4f33ecd53a24ae4807409da0e5e90fd4 (patch)
tree78038c05146e206da2db48be3456342eef080f36 /include/linux/msi.h
parent1900c962e2dcfacec894558eb34971bdc9c67443 (diff)
downloadlinux-125282cd4f33ecd53a24ae4807409da0e5e90fd4.tar.xz
genirq/msi: Move descriptor list to struct msi_device_data
It's only required when MSI is in use. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Michael Kelley <mikelley@microsoft.com> Tested-by: Nishanth Menon <nm@ti.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20211206210747.650487479@linutronix.de
Diffstat (limited to 'include/linux/msi.h')
-rw-r--r--include/linux/msi.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/msi.h b/include/linux/msi.h
index 7593fc383dba..4223e47103ed 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -144,11 +144,13 @@ struct msi_desc {
* @properties: MSI properties which are interesting to drivers
* @attrs: Pointer to the sysfs attribute group
* @platform_data: Platform-MSI specific data
+ * @list: List of MSI descriptors associated to the device
*/
struct msi_device_data {
unsigned long properties;
const struct attribute_group **attrs;
struct platform_msi_priv_data *platform_data;
+ struct list_head list;
};
int msi_setup_device_data(struct device *dev);
@@ -157,7 +159,7 @@ 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)
+#define dev_to_msi_list(dev) (&(dev)->msi.data->list)
#define first_msi_entry(dev) \
list_first_entry(dev_to_msi_list((dev)), struct msi_desc, list)
#define for_each_msi_entry(desc, dev) \