Lines Matching refs:mm
84 static int cxl_fault_segment(struct cxl_context *ctx, struct mm_struct *mm, in cxl_fault_segment() argument
90 if (!(rc = copro_calculate_slb(mm, ea, &slb))) { in cxl_fault_segment()
113 struct mm_struct *mm, u64 ea) in cxl_handle_segment_miss() argument
120 if ((rc = cxl_fault_segment(ctx, mm, ea))) in cxl_handle_segment_miss()
131 int cxl_handle_mm_fault(struct mm_struct *mm, u64 dsisr, u64 dar) in cxl_handle_mm_fault() argument
144 if (mm && !cpumask_test_cpu(smp_processor_id(), mm_cpumask(mm))) { in cxl_handle_mm_fault()
145 cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm)); in cxl_handle_mm_fault()
153 if ((result = copro_handle_mm_fault(mm, dar, dsisr, &flt))) { in cxl_handle_mm_fault()
167 if (!mm && (get_region_id(dar) != USER_REGION_ID)) in cxl_handle_mm_fault()
174 hash_page_mm(mm, dar, access, 0x300, inv_flags); in cxl_handle_mm_fault()
181 struct mm_struct *mm, in cxl_handle_page_fault() argument
186 if (cxl_handle_mm_fault(mm, dsisr, dar)) { in cxl_handle_page_fault()
200 if (ctx->mm == NULL) in get_mem_context()
203 if (!mmget_not_zero(ctx->mm)) in get_mem_context()
206 return ctx->mm; in get_mem_context()
234 struct mm_struct *mm = NULL; in cxl_handle_fault() local
260 mm = get_mem_context(ctx); in cxl_handle_fault()
261 if (mm == NULL) { in cxl_handle_fault()
273 cxl_handle_segment_miss(ctx, mm, dar); in cxl_handle_fault()
275 cxl_handle_page_fault(ctx, mm, dsisr, dar); in cxl_handle_fault()
279 if (mm) in cxl_handle_fault()
280 mmput(mm); in cxl_handle_fault()
285 struct mm_struct *mm; in cxl_prefault_one() local
287 mm = get_mem_context(ctx); in cxl_prefault_one()
288 if (mm == NULL) { in cxl_prefault_one()
294 cxl_fault_segment(ctx, mm, ea); in cxl_prefault_one()
296 mmput(mm); in cxl_prefault_one()
315 struct mm_struct *mm; in cxl_prefault_vma() local
317 mm = get_mem_context(ctx); in cxl_prefault_vma()
318 if (mm == NULL) { in cxl_prefault_vma()
324 mmap_read_lock(mm); in cxl_prefault_vma()
325 for (vma = mm->mmap; vma; vma = vma->vm_next) { in cxl_prefault_vma()
328 rc = copro_calculate_slb(mm, ea, &slb); in cxl_prefault_vma()
339 mmap_read_unlock(mm); in cxl_prefault_vma()
341 mmput(mm); in cxl_prefault_vma()