Lines Matching refs:slb
26 static bool sste_matches(struct cxl_sste *sste, struct copro_slb *slb) in sste_matches() argument
28 return ((sste->vsid_data == cpu_to_be64(slb->vsid)) && in sste_matches()
29 (sste->esid_data == cpu_to_be64(slb->esid))); in sste_matches()
37 struct copro_slb *slb) in find_free_sste() argument
44 if (slb->vsid & SLB_VSID_B_1T) in find_free_sste()
45 hash = (slb->esid >> SID_SHIFT_1T) & mask; in find_free_sste()
47 hash = (slb->esid >> SID_SHIFT) & mask; in find_free_sste()
54 if (sste_matches(sste, slb)) in find_free_sste()
67 static void cxl_load_segment(struct cxl_context *ctx, struct copro_slb *slb) in cxl_load_segment() argument
74 sste = find_free_sste(ctx, slb); in cxl_load_segment()
79 sste - ctx->sstp, slb->vsid, slb->esid); in cxl_load_segment()
80 trace_cxl_ste_write(ctx, sste - ctx->sstp, slb->esid, slb->vsid); in cxl_load_segment()
82 sste->vsid_data = cpu_to_be64(slb->vsid); in cxl_load_segment()
83 sste->esid_data = cpu_to_be64(slb->esid); in cxl_load_segment()
91 struct copro_slb slb = {0,0}; in cxl_fault_segment() local
94 if (!(rc = copro_calculate_slb(mm, ea, &slb))) { in cxl_fault_segment()
95 cxl_load_segment(ctx, &slb); in cxl_fault_segment()
316 struct copro_slb slb; in cxl_prefault_vma() local
331 ea = next_segment(ea, slb.vsid)) { in cxl_prefault_vma()
332 rc = copro_calculate_slb(mm, ea, &slb); in cxl_prefault_vma()
336 if (last_esid == slb.esid) in cxl_prefault_vma()
339 cxl_load_segment(ctx, &slb); in cxl_prefault_vma()
340 last_esid = slb.esid; in cxl_prefault_vma()