Lines Matching full:asid
54 struct qcom_iommu_ctx *ctxs[]; /* indexed by asid */
62 u8 asid; /* asid and ctx bank # are 1:1 */ member
82 static struct qcom_iommu_ctx * to_ctx(struct qcom_iommu_domain *d, unsigned asid) in to_ctx() argument
87 return qcom_iommu->ctxs[asid]; in to_ctx()
141 iommu_writel(ctx, ARM_SMMU_CB_S1_TLBIASID, ctx->asid); in qcom_iommu_tlb_inv_context()
161 iova |= ctx->asid; in qcom_iommu_tlb_inv_range_nosync()
207 fsr, iova, fsynr, ctx->asid); in qcom_iommu_fault()
258 ret = qcom_scm_restore_sec_cfg(qcom_iommu->sec_id, ctx->asid); in qcom_iommu_init_domain()
282 FIELD_PREP(ARM_SMMU_TTBRn_ASID, ctx->asid)); in qcom_iommu_init_domain()
554 unsigned asid = args->args[0]; in qcom_iommu_of_xlate() local
569 /* make sure the asid specified in dt is valid, so we don't have in qcom_iommu_of_xlate()
572 if (WARN_ON(asid > qcom_iommu->max_asid) || in qcom_iommu_of_xlate()
573 WARN_ON(qcom_iommu->ctxs[asid] == NULL)) { in qcom_iommu_of_xlate()
591 return iommu_fwspec_add_ids(dev, &asid, 1); in qcom_iommu_of_xlate()
661 int asid; in get_asid() local
664 * of the context bank, and calculate the asid from that: in get_asid()
670 * Context banks are 0x1000 apart but, in some cases, the ASID in get_asid()
674 if (!of_property_read_u32(np, "qcom,ctx-asid", &val)) in get_asid()
675 asid = val; in get_asid()
677 asid = reg / 0x1000; in get_asid()
679 return asid; in get_asid()
729 ctx->asid = ret; in qcom_iommu_ctx_probe()
731 dev_dbg(dev, "found asid %u\n", ctx->asid); in qcom_iommu_ctx_probe()
733 qcom_iommu->ctxs[ctx->asid] = ctx; in qcom_iommu_ctx_probe()
745 qcom_iommu->ctxs[ctx->asid] = NULL; in qcom_iommu_ctx_remove()
789 /* find the max asid (which is 1:1 to ctx bank idx), so we know how in qcom_iommu_device_probe()