Lines Matching refs:fwspec
1126 struct iommu_fwspec *fwspec = dev->iommu_fwspec; in arm_smmu_master_alloc_smes() local
1127 struct arm_smmu_master_cfg *cfg = fwspec->iommu_priv; in arm_smmu_master_alloc_smes()
1135 for_each_cfg_sme(fwspec, i, idx) { in arm_smmu_master_alloc_smes()
1136 u16 sid = fwspec->ids[i]; in arm_smmu_master_alloc_smes()
1137 u16 mask = fwspec->ids[i] >> SMR_MASK_SHIFT; in arm_smmu_master_alloc_smes()
1168 for_each_cfg_sme(fwspec, i, idx) { in arm_smmu_master_alloc_smes()
1185 static void arm_smmu_master_free_smes(struct iommu_fwspec *fwspec) in arm_smmu_master_free_smes() argument
1187 struct arm_smmu_device *smmu = fwspec_smmu(fwspec); in arm_smmu_master_free_smes()
1188 struct arm_smmu_master_cfg *cfg = fwspec->iommu_priv; in arm_smmu_master_free_smes()
1192 for_each_cfg_sme(fwspec, i, idx) { in arm_smmu_master_free_smes()
1201 struct iommu_fwspec *fwspec) in arm_smmu_domain_add_master() argument
1209 for_each_cfg_sme(fwspec, i, idx) { in arm_smmu_domain_add_master()
1224 struct iommu_fwspec *fwspec = dev->iommu_fwspec; in arm_smmu_attach_dev() local
1228 if (!fwspec || fwspec->ops != &arm_smmu_ops) { in arm_smmu_attach_dev()
1240 if (!fwspec->iommu_priv) in arm_smmu_attach_dev()
1243 smmu = fwspec_smmu(fwspec); in arm_smmu_attach_dev()
1261 return arm_smmu_domain_add_master(smmu_domain, fwspec); in arm_smmu_attach_dev()
1397 struct iommu_fwspec *fwspec = dev->iommu_fwspec; in arm_smmu_add_device() local
1402 fwspec = dev->iommu_fwspec; in arm_smmu_add_device()
1405 } else if (fwspec && fwspec->ops == &arm_smmu_ops) { in arm_smmu_add_device()
1406 smmu = arm_smmu_get_by_node(to_of_node(fwspec->iommu_fwnode)); in arm_smmu_add_device()
1412 for (i = 0; i < fwspec->num_ids; i++) { in arm_smmu_add_device()
1413 u16 sid = fwspec->ids[i]; in arm_smmu_add_device()
1414 u16 mask = fwspec->ids[i] >> SMR_MASK_SHIFT; in arm_smmu_add_device()
1435 fwspec->iommu_priv = cfg; in arm_smmu_add_device()
1446 if (fwspec) in arm_smmu_add_device()
1447 kfree(fwspec->iommu_priv); in arm_smmu_add_device()
1454 struct iommu_fwspec *fwspec = dev->iommu_fwspec; in arm_smmu_remove_device() local
1456 if (!fwspec || fwspec->ops != &arm_smmu_ops) in arm_smmu_remove_device()
1459 arm_smmu_master_free_smes(fwspec); in arm_smmu_remove_device()
1461 kfree(fwspec->iommu_priv); in arm_smmu_remove_device()
1467 struct iommu_fwspec *fwspec = dev->iommu_fwspec; in arm_smmu_device_group() local
1468 struct arm_smmu_device *smmu = fwspec_smmu(fwspec); in arm_smmu_device_group()
1472 for_each_cfg_sme(fwspec, i, idx) { in arm_smmu_device_group()