Lines Matching refs:mm

6 #include <linux/mm.h>
9 #include <linux/sched/mm.h>
27 struct mm_struct *mm;
61 arm_smmu_share_asid(struct mm_struct *mm, u16 asid)
73 if (cd->mm) {
74 if (WARN_ON(cd->mm != mm))
76 /* All devices bound to this mm use the same cd struct. */
108 static struct arm_smmu_ctx_desc *arm_smmu_alloc_shared_cd(struct mm_struct *mm)
116 /* Don't free the mm until we release the ASID */
117 mmgrab(mm);
119 asid = arm64_mm_context_get(mm);
134 ret = arm_smmu_share_asid(mm, asid);
172 cd->ttbr = virt_to_phys(mm->pgd);
180 cd->mm = mm;
189 arm64_mm_context_put(mm);
191 mmdrop(mm);
199 arm64_mm_context_put(cd->mm);
200 mmdrop(cd->mm);
215 struct mm_struct *mm,
248 arm_smmu_atc_inv_domain(smmu_domain, mm_get_enqcmd_pasid(mm), start,
252 static void arm_smmu_mm_release(struct mmu_notifier *mn, struct mm_struct *mm)
267 arm_smmu_update_ctx_desc_devices(smmu_domain, mm_get_enqcmd_pasid(mm),
271 arm_smmu_atc_inv_domain(smmu_domain, mm_get_enqcmd_pasid(mm), 0, 0);
288 /* Allocate or get existing MMU notifier for this {domain, mm} pair */
291 struct mm_struct *mm)
298 if (smmu_mn->mn.mm == mm) {
304 cd = arm_smmu_alloc_shared_cd(mm);
319 ret = mmu_notifier_register(&smmu_mn->mn, mm);
335 struct mm_struct *mm = smmu_mn->mn.mm;
350 arm_smmu_atc_inv_domain(smmu_domain, mm_get_enqcmd_pasid(mm), 0,
360 struct mm_struct *mm)
381 bond->mm = mm;
383 bond->smmu_mn = arm_smmu_mmu_notifier_get(smmu_domain, mm);
437 * See max_pinned_asids in arch/arm64/mm/context.c. The following is
543 struct mm_struct *mm = domain->mm;
552 if (t->mm == mm) {
570 struct mm_struct *mm = domain->mm;
573 ret = __arm_smmu_sva_bind(dev, id, mm);