Lines Matching refs:slb
22 static bool sste_matches(struct cxl_sste *sste, struct copro_slb *slb) in sste_matches() argument
24 return ((sste->vsid_data == cpu_to_be64(slb->vsid)) && in sste_matches()
25 (sste->esid_data == cpu_to_be64(slb->esid))); in sste_matches()
33 struct copro_slb *slb) in find_free_sste() argument
40 if (slb->vsid & SLB_VSID_B_1T) in find_free_sste()
41 hash = (slb->esid >> SID_SHIFT_1T) & mask; in find_free_sste()
43 hash = (slb->esid >> SID_SHIFT) & mask; in find_free_sste()
50 if (sste_matches(sste, slb)) in find_free_sste()
63 static void cxl_load_segment(struct cxl_context *ctx, struct copro_slb *slb) in cxl_load_segment() argument
70 sste = find_free_sste(ctx, slb); in cxl_load_segment()
75 sste - ctx->sstp, slb->vsid, slb->esid); in cxl_load_segment()
76 trace_cxl_ste_write(ctx, sste - ctx->sstp, slb->esid, slb->vsid); in cxl_load_segment()
78 sste->vsid_data = cpu_to_be64(slb->vsid); in cxl_load_segment()
79 sste->esid_data = cpu_to_be64(slb->esid); in cxl_load_segment()
87 struct copro_slb slb = {0,0}; in cxl_fault_segment() local
90 if (!(rc = copro_calculate_slb(mm, ea, &slb))) { in cxl_fault_segment()
91 cxl_load_segment(ctx, &slb); in cxl_fault_segment()
296 struct copro_slb slb; in cxl_prefault_vma() local
304 ea = next_segment(ea, slb.vsid)) { in cxl_prefault_vma()
305 rc = copro_calculate_slb(mm, ea, &slb); in cxl_prefault_vma()
309 if (last_esid == slb.esid) in cxl_prefault_vma()
312 cxl_load_segment(ctx, &slb); in cxl_prefault_vma()
313 last_esid = slb.esid; in cxl_prefault_vma()