Lines Matching full:master
27 struct arm_smmu_master *master = master_domain->master; in arm_smmu_update_s1_domain_cd_entry() local
30 cdptr = arm_smmu_get_cd_ptr(master, master_domain->ssid); in arm_smmu_update_s1_domain_cd_entry()
34 arm_smmu_make_s1_cd(&target_cd, master, smmu_domain); in arm_smmu_update_s1_domain_cd_entry()
35 arm_smmu_write_cd_entry(master, master_domain->ssid, cdptr, in arm_smmu_update_s1_domain_cd_entry()
54 struct arm_smmu_master *master, struct mm_struct *mm, in arm_smmu_make_sva_cd() argument
73 (master->stall_enabled ? CTXDESC_CD_0_S : 0) | in arm_smmu_make_sva_cd()
105 if (!(master->smmu->features & ARM_SMMU_FEAT_STALL_FORCE)) in arm_smmu_make_sva_cd()
173 struct arm_smmu_master *master = master_domain->master; in arm_smmu_mm_release() local
177 cdptr = arm_smmu_get_cd_ptr(master, master_domain->ssid); in arm_smmu_mm_release()
180 arm_smmu_make_sva_cd(&target, master, NULL, in arm_smmu_mm_release()
182 arm_smmu_write_cd_entry(master, master_domain->ssid, cdptr, in arm_smmu_mm_release()
247 bool arm_smmu_master_iopf_supported(struct arm_smmu_master *master) in arm_smmu_master_iopf_supported() argument
250 if (master->num_streams != 1) in arm_smmu_master_iopf_supported()
253 return master->stall_enabled; in arm_smmu_master_iopf_supported()
256 bool arm_smmu_master_sva_supported(struct arm_smmu_master *master) in arm_smmu_master_sva_supported() argument
258 if (!(master->smmu->features & ARM_SMMU_FEAT_SVA)) in arm_smmu_master_sva_supported()
262 return master->ssid_bits; in arm_smmu_master_sva_supported()
265 bool arm_smmu_master_sva_enabled(struct arm_smmu_master *master) in arm_smmu_master_sva_enabled() argument
270 enabled = master->sva_enabled; in arm_smmu_master_sva_enabled()
275 static int arm_smmu_master_sva_enable_iopf(struct arm_smmu_master *master) in arm_smmu_master_sva_enable_iopf() argument
277 struct device *dev = master->dev; in arm_smmu_master_sva_enable_iopf()
283 if (!arm_smmu_master_iopf_supported(master)) in arm_smmu_master_sva_enable_iopf()
286 if (!master->iopf_enabled) in arm_smmu_master_sva_enable_iopf()
289 return iopf_queue_add_device(master->smmu->evtq.iopf, dev); in arm_smmu_master_sva_enable_iopf()
292 static void arm_smmu_master_sva_disable_iopf(struct arm_smmu_master *master) in arm_smmu_master_sva_disable_iopf() argument
294 struct device *dev = master->dev; in arm_smmu_master_sva_disable_iopf()
296 if (!master->iopf_enabled) in arm_smmu_master_sva_disable_iopf()
299 iopf_queue_remove_device(master->smmu->evtq.iopf, dev); in arm_smmu_master_sva_disable_iopf()
302 int arm_smmu_master_enable_sva(struct arm_smmu_master *master) in arm_smmu_master_enable_sva() argument
307 ret = arm_smmu_master_sva_enable_iopf(master); in arm_smmu_master_enable_sva()
309 master->sva_enabled = true; in arm_smmu_master_enable_sva()
315 int arm_smmu_master_disable_sva(struct arm_smmu_master *master) in arm_smmu_master_disable_sva() argument
318 arm_smmu_master_sva_disable_iopf(master); in arm_smmu_master_disable_sva()
319 master->sva_enabled = false; in arm_smmu_master_disable_sva()
338 struct arm_smmu_master *master = dev_iommu_priv_get(dev); in arm_smmu_sva_set_dev_pasid() local
350 arm_smmu_make_sva_cd(&target, master, domain->mm, smmu_domain->cd.asid); in arm_smmu_sva_set_dev_pasid()
351 ret = arm_smmu_set_pasid(master, smmu_domain, id, &target); in arm_smmu_sva_set_dev_pasid()
389 struct arm_smmu_master *master = dev_iommu_priv_get(dev); in arm_smmu_sva_domain_alloc() local
390 struct arm_smmu_device *smmu = master->smmu; in arm_smmu_sva_domain_alloc()