Lines Matching defs:mm

6 #include <linux/mm.h>
9 #include <linux/sched/mm.h>
28 struct mm_struct *mm;
66 arm_smmu_share_asid(struct mm_struct *mm, u16 asid)
78 if (cd->mm) {
79 if (WARN_ON(cd->mm != mm))
81 /* All devices bound to this mm use the same cd struct. */
126 struct arm_smmu_master *master, struct mm_struct *mm,
156 if (mm) {
167 target->data[1] = cpu_to_le64(virt_to_phys(mm->pgd) &
190 static struct arm_smmu_ctx_desc *arm_smmu_alloc_shared_cd(struct mm_struct *mm)
197 /* Don't free the mm until we release the ASID */
198 mmgrab(mm);
200 asid = arm64_mm_context_get(mm);
215 ret = arm_smmu_share_asid(mm, asid);
228 cd->mm = mm;
237 arm64_mm_context_put(mm);
239 mmdrop(mm);
247 arm64_mm_context_put(cd->mm);
248 mmdrop(cd->mm);
263 struct mm_struct *mm,
296 arm_smmu_atc_inv_domain(smmu_domain, mm_get_enqcmd_pasid(mm), start,
300 static void arm_smmu_mm_release(struct mmu_notifier *mn, struct mm_struct *mm)
322 cdptr = arm_smmu_get_cd_ptr(master, mm_get_enqcmd_pasid(mm));
326 arm_smmu_write_cd_entry(master, mm_get_enqcmd_pasid(mm), cdptr,
332 arm_smmu_atc_inv_domain(smmu_domain, mm_get_enqcmd_pasid(mm), 0, 0);
349 /* Allocate or get existing MMU notifier for this {domain, mm} pair */
352 struct mm_struct *mm)
359 if (smmu_mn->mn.mm == mm) {
365 cd = arm_smmu_alloc_shared_cd(mm);
380 ret = mmu_notifier_register(&smmu_mn->mn, mm);
396 struct mm_struct *mm = smmu_mn->mn.mm;
411 arm_smmu_atc_inv_domain(smmu_domain, mm_get_enqcmd_pasid(mm), 0,
421 struct mm_struct *mm)
444 bond->mm = mm;
446 bond->smmu_mn = arm_smmu_mmu_notifier_get(smmu_domain, mm);
452 cdptr = arm_smmu_alloc_cd_ptr(master, mm_get_enqcmd_pasid(mm));
457 arm_smmu_make_sva_cd(&target, master, mm, bond->smmu_mn->cd->asid);
504 * See max_pinned_asids in arch/arm64/mm/context.c. The following is
610 struct mm_struct *mm = domain->mm;
619 if (t->mm == mm) {
637 struct mm_struct *mm = domain->mm;
639 if (mm_get_enqcmd_pasid(mm) != id)
643 ret = __arm_smmu_sva_bind(dev, id, mm);