Move the pointer for iommu private data from struct iommu_fwspec to struct dev_iommu.
Unified · Split
| @@ -369,6 +369,7 @@ struct iommu_fault_param { · 368 unmodified lines | |||
| 369 | * | 369 | * |
| 370 | * @fault_param: IOMMU detected device fault reporting data | 370 | * @fault_param: IOMMU detected device fault reporting data |
| 371 | * @fwspec: IOMMU fwspec data | 371 | * @fwspec: IOMMU fwspec data |
| 372 | * @priv: IOMMU Driver private data | ||
| 372 | * | 373 | * |
| 373 | * TODO: migrate other per device data pointers under iommu_dev_data, e.g. | 374 | * TODO: migrate other per device data pointers under iommu_dev_data, e.g. |
| 374 | * struct iommu_group *iommu_group; | 375 | * struct iommu_group *iommu_group; |
| @@ -377,6 +378,7 @@ struct dev_iommu { · 2 unmodified lines | |||
| 377 | struct mutex lock; | 378 | struct mutex lock; |
| 378 | struct iommu_fault_param *fault_param; | 379 | struct iommu_fault_param *fault_param; |
| 379 | struct iommu_fwspec *fwspec; | 380 | struct iommu_fwspec *fwspec; |
| 381 | void *priv; | ||
| 380 | }; | 382 | }; |
| 381 | 383 | ||
| 382 | int iommu_device_register(struct iommu_device *iommu); | 384 | int iommu_device_register(struct iommu_device *iommu); |
| @@ -589,7 +591,6 @@ struct iommu_group *fsl_mc_device_group(struct device *dev); · 206 unmodified lines | |||
| 589 | struct iommu_fwspec { | 591 | struct iommu_fwspec { |
| 590 | const struct iommu_ops *ops; | 592 | const struct iommu_ops *ops; |
| 591 | struct fwnode_handle *iommu_fwnode; | 593 | struct fwnode_handle *iommu_fwnode; |
| 592 | void *iommu_priv; | ||
| 593 | u32 flags; | 594 | u32 flags; |
| 594 | u32 num_pasid_bits; | 595 | u32 num_pasid_bits; |
| 595 | unsigned int num_ids; | 596 | unsigned int num_ids; |
| @@ -629,12 +630,12 @@ static inline void dev_iommu_fwspec_set(struct device *dev, · 33 unmodified lines | |||
| 629 | 630 | ||
| 630 | static inline void *dev_iommu_priv_get(struct device *dev) | 631 | static inline void *dev_iommu_priv_get(struct device *dev) |
| 631 | { | 632 | { |
| 632 | return dev->iommu->fwspec->iommu_priv; | 633 | return dev->iommu->priv; |
| 633 | } | 634 | } |
| 634 | 635 | ||
| 635 | static inline void dev_iommu_priv_set(struct device *dev, void *priv) | 636 | static inline void dev_iommu_priv_set(struct device *dev, void *priv) |
| 636 | { | 637 | { |
| 637 | dev->iommu->fwspec->iommu_priv = priv; | 638 | dev->iommu->priv = priv; |
| 638 | } | 639 | } |
| 639 | 640 | ||
| 640 | int iommu_probe_device(struct device *dev); | 641 | int iommu_probe_device(struct device *dev); |