mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
device: Add device:: Msi_data pointer and struct msi_device_data
Create struct msi_device_data and add a pointer of that type to struct dev_msi_info, which is part of struct device. Provide an allocator function which can be invoked from the MSI interrupt allocation code pathes. Add a properties field to the data structure as a first member so the allocation size is not zero bytes. The field will be uses later on. 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/20211210221813.676660809@linutronix.de
This commit is contained in:
@@ -45,6 +45,7 @@ struct iommu_ops;
|
||||
struct iommu_group;
|
||||
struct dev_pin_info;
|
||||
struct dev_iommu;
|
||||
struct msi_device_data;
|
||||
|
||||
/**
|
||||
* struct subsys_interface - interfaces to device functions
|
||||
@@ -374,11 +375,15 @@ struct dev_links_info {
|
||||
/**
|
||||
* struct dev_msi_info - Device data related to MSI
|
||||
* @domain: The MSI interrupt domain associated to the device
|
||||
* @data: Pointer to MSI device data
|
||||
*/
|
||||
struct dev_msi_info {
|
||||
#ifdef CONFIG_GENERIC_MSI_IRQ_DOMAIN
|
||||
struct irq_domain *domain;
|
||||
#endif
|
||||
#ifdef CONFIG_GENERIC_MSI_IRQ
|
||||
struct msi_device_data *data;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user