diff options
Diffstat (limited to 'include/linux/device.h')
| -rw-r--r-- | include/linux/device.h | 31 | 
1 files changed, 19 insertions, 12 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index e270cb740b9e..93459724dcde 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -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 @@ -372,6 +373,20 @@ 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 +}; + +/**   * struct device - The basic device structure   * @parent:	The device's "parent" device, the device to which it is attached.   * 		In most cases, a parent device is some sort of bus or host @@ -407,9 +422,7 @@ struct dev_links_info {   * @em_pd:	device's energy model performance domain   * @pins:	For device pin management.   *		See Documentation/driver-api/pin-control.rst for details. - * @msi_lock:	Lock to protect MSI mask cache and mask register - * @msi_list:	Hosts MSI descriptors - * @msi_domain: The generic MSI domain this device is using. + * @msi:	MSI related data   * @numa_node:	NUMA node this device is close to.   * @dma_ops:    DMA mapping operations for this device.   * @dma_mask:	Dma mask (if dma'ble device). @@ -501,16 +514,10 @@ struct device {  	struct em_perf_domain	*em_pd;  #endif -#ifdef CONFIG_GENERIC_MSI_IRQ_DOMAIN -	struct irq_domain	*msi_domain; -#endif  #ifdef CONFIG_PINCTRL  	struct dev_pin_info	*pins;  #endif -#ifdef CONFIG_GENERIC_MSI_IRQ -	raw_spinlock_t		msi_lock; -	struct list_head	msi_list; -#endif +	struct dev_msi_info	msi;  #ifdef CONFIG_DMA_OPS  	const struct dma_map_ops *dma_ops;  #endif @@ -668,7 +675,7 @@ static inline void set_dev_node(struct device *dev, int node)  static inline struct irq_domain *dev_get_msi_domain(const struct device *dev)  {  #ifdef CONFIG_GENERIC_MSI_IRQ_DOMAIN -	return dev->msi_domain; +	return dev->msi.domain;  #else  	return NULL;  #endif @@ -677,7 +684,7 @@ static inline struct irq_domain *dev_get_msi_domain(const struct device *dev)  static inline void dev_set_msi_domain(struct device *dev, struct irq_domain *d)  {  #ifdef CONFIG_GENERIC_MSI_IRQ_DOMAIN -	dev->msi_domain = d; +	dev->msi.domain = d;  #endif  }  |