Lines Matching refs:asid
62 * asid in use ("x"s below). Set "limit" to this value.
70 * Each time MAX_ASID is reached, increment the asid generation. Since
73 * a context, the asid generation of the GTS asid is rechecked. If it
74 * doesn't match the current generation, a new asid will be assigned.
79 * All asid manipulation & context loading/unloading is protected by the
83 /* Hit the asid limit. Start over */
93 static int gru_reset_asid_limit(struct gru_state *gru, int asid)
97 gru_dbg(grudev, "gid %d, asid 0x%x\n", gru->gs_gid, asid);
100 if (asid >= limit)
101 asid = gru_wrap_asid(gru);
112 if (inuse_asid == asid) {
113 asid += ASID_INC;
114 if (asid >= limit) {
120 if (asid >= MAX_ASID)
121 asid = gru_wrap_asid(gru);
126 if ((inuse_asid > asid) && (inuse_asid < limit))
130 gru->gs_asid = asid;
131 gru_dbg(grudev, "gid %d, new asid 0x%x, new_limit 0x%x\n", gru->gs_gid,
132 asid, limit);
133 return asid;
139 int asid;
142 asid = gru->gs_asid;
143 if (asid >= gru->gs_asid_limit)
144 asid = gru_reset_asid_limit(gru, asid);
146 gru_dbg(grudev, "gid %d, asid 0x%x\n", gru->gs_gid, asid);
147 return asid;
230 int asid;
233 asid = asids->mt_asid;
236 if (asid == 0 || (asids->mt_ctxbitmap == 0 && asids->mt_asid_gen !=
238 asid = gru_assign_asid(gru);
239 asids->mt_asid = asid;
254 "gid %d, gts %p, gms %p, ctxnum %d, asid 0x%x, asidmap 0x%lx\n",
255 gru->gs_gid, gts, gms, gts->ts_ctxnum, asid,
257 return asid;
582 int i, err, asid, ctxnum = gts->ts_ctxnum;
613 asid = gru_load_mm_tracker(gru, gts);
615 cch->asid[i] = asid + i;