Lines Matching refs:asid
93 static int gru_reset_asid_limit(struct gru_state *gru, int asid) in gru_reset_asid_limit() argument
97 gru_dbg(grudev, "gid %d, asid 0x%x\n", gru->gs_gid, asid); in gru_reset_asid_limit()
100 if (asid >= limit) in gru_reset_asid_limit()
101 asid = gru_wrap_asid(gru); in gru_reset_asid_limit()
112 if (inuse_asid == asid) { in gru_reset_asid_limit()
113 asid += ASID_INC; in gru_reset_asid_limit()
114 if (asid >= limit) { in gru_reset_asid_limit()
120 if (asid >= MAX_ASID) in gru_reset_asid_limit()
121 asid = gru_wrap_asid(gru); in gru_reset_asid_limit()
126 if ((inuse_asid > asid) && (inuse_asid < limit)) in gru_reset_asid_limit()
130 gru->gs_asid = asid; in gru_reset_asid_limit()
132 asid, limit); in gru_reset_asid_limit()
133 return asid; in gru_reset_asid_limit()
139 int asid; in gru_assign_asid() local
142 asid = gru->gs_asid; in gru_assign_asid()
143 if (asid >= gru->gs_asid_limit) in gru_assign_asid()
144 asid = gru_reset_asid_limit(gru, asid); in gru_assign_asid()
146 gru_dbg(grudev, "gid %d, asid 0x%x\n", gru->gs_gid, asid); in gru_assign_asid()
147 return asid; in gru_assign_asid()
230 int asid; in gru_load_mm_tracker() local
233 asid = asids->mt_asid; in gru_load_mm_tracker()
236 if (asid == 0 || (asids->mt_ctxbitmap == 0 && asids->mt_asid_gen != in gru_load_mm_tracker()
238 asid = gru_assign_asid(gru); in gru_load_mm_tracker()
239 asids->mt_asid = asid; in gru_load_mm_tracker()
255 gru->gs_gid, gts, gms, gts->ts_ctxnum, asid, in gru_load_mm_tracker()
257 return asid; in gru_load_mm_tracker()
582 int i, err, asid, ctxnum = gts->ts_ctxnum; in gru_load_context() local
613 asid = gru_load_mm_tracker(gru, gts); in gru_load_context()
615 cch->asid[i] = asid + i; in gru_load_context()