Skip to content

Commit 986d5ec

Browse files
committed
iommu: Move fwspec->iommu_priv to struct dev_iommu
Move the pointer for iommu private data from struct iommu_fwspec to struct dev_iommu. Signed-off-by: Joerg Roedel <[email protected]> Tested-by: Will Deacon <[email protected]> # arm-smmu Reviewed-by: Jean-Philippe Brucker <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a4b6c2a commit 986d5ec

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

include/linux/iommu.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ struct iommu_fault_param {
369369
*
370370
* @fault_param: IOMMU detected device fault reporting data
371371
* @fwspec: IOMMU fwspec data
372+
* @priv: IOMMU Driver private data
372373
*
373374
* TODO: migrate other per device data pointers under iommu_dev_data, e.g.
374375
* struct iommu_group *iommu_group;
@@ -377,6 +378,7 @@ struct dev_iommu {
377378
struct mutex lock;
378379
struct iommu_fault_param *fault_param;
379380
struct iommu_fwspec *fwspec;
381+
void *priv;
380382
};
381383

382384
int iommu_device_register(struct iommu_device *iommu);
@@ -589,7 +591,6 @@ struct iommu_group *fsl_mc_device_group(struct device *dev);
589591
struct iommu_fwspec {
590592
const struct iommu_ops *ops;
591593
struct fwnode_handle *iommu_fwnode;
592-
void *iommu_priv;
593594
u32 flags;
594595
u32 num_pasid_bits;
595596
unsigned int num_ids;
@@ -629,12 +630,12 @@ static inline void dev_iommu_fwspec_set(struct device *dev,
629630

630631
static inline void *dev_iommu_priv_get(struct device *dev)
631632
{
632-
return dev->iommu->fwspec->iommu_priv;
633+
return dev->iommu->priv;
633634
}
634635

635636
static inline void dev_iommu_priv_set(struct device *dev, void *priv)
636637
{
637-
dev->iommu->fwspec->iommu_priv = priv;
638+
dev->iommu->priv = priv;
638639
}
639640

640641
int iommu_probe_device(struct device *dev);

0 commit comments

Comments
 (0)