diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2024-06-23 17:19:07 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-07-18 20:31:21 +0200 |
commit | 2fdda02a8749fdaff5621c96aaf24a61d2f8c5a2 (patch) | |
tree | 1931cb097eac552240887a6d4fa4420bbfa529e0 /kernel/irq/msi.c | |
parent | e9894248994ca8291838baf063f045eab28e5a0e (diff) | |
download | lwn-2fdda02a8749fdaff5621c96aaf24a61d2f8c5a2.tar.gz lwn-2fdda02a8749fdaff5621c96aaf24a61d2f8c5a2.zip |
genirq/msi: Move msi_device_data to core
Now that the platform MSI hack is gone, nothing needs to know about struct
msi_device_data outside of the core code.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Shivamurthy Shastri <shivamurthy.shastri@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240623142236.003295177@linutronix.de
Diffstat (limited to 'kernel/irq/msi.c')
-rw-r--r-- | kernel/irq/msi.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index 8314b1d4a903..5fa0547ece0c 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -8,18 +8,34 @@ * This file contains common code to support Message Signaled Interrupts for * PCI compatible and non PCI compatible devices. */ -#include <linux/types.h> #include <linux/device.h> #include <linux/irq.h> #include <linux/irqdomain.h> #include <linux/msi.h> +#include <linux/mutex.h> +#include <linux/pci.h> #include <linux/slab.h> #include <linux/sysfs.h> -#include <linux/pci.h> +#include <linux/types.h> +#include <linux/xarray.h> #include "internals.h" /** + * struct msi_device_data - MSI per device data + * @properties: MSI properties which are interesting to drivers + * @mutex: Mutex protecting the MSI descriptor store + * @__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 mutex mutex; + struct msi_dev_domain __domains[MSI_MAX_DEVICE_IRQDOMAINS]; + unsigned long __iter_idx; +}; + +/** * struct msi_ctrl - MSI internal management control structure * @domid: ID of the domain on which management operations should be done * @first: First (hardware) slot index to operate on |