Lines Matching refs:asid
74 * asid in use ("x"s below). Set "limit" to this value.
82 * Each time MAX_ASID is reached, increment the asid generation. Since
85 * a context, the asid generation of the GTS asid is rechecked. If it
86 * doesn't match the current generation, a new asid will be assigned.
91 * All asid manipulation & context loading/unloading is protected by the
95 /* Hit the asid limit. Start over */
105 static int gru_reset_asid_limit(struct gru_state *gru, int asid)
109 gru_dbg(grudev, "gid %d, asid 0x%x\n", gru->gs_gid, asid);
112 if (asid >= limit)
113 asid = gru_wrap_asid(gru);
124 if (inuse_asid == asid) {
125 asid += ASID_INC;
126 if (asid >= limit) {
132 if (asid >= MAX_ASID)
133 asid = gru_wrap_asid(gru);
138 if ((inuse_asid > asid) && (inuse_asid < limit))
142 gru->gs_asid = asid;
143 gru_dbg(grudev, "gid %d, new asid 0x%x, new_limit 0x%x\n", gru->gs_gid,
144 asid, limit);
145 return asid;
151 int asid;
154 asid = gru->gs_asid;
155 if (asid >= gru->gs_asid_limit)
156 asid = gru_reset_asid_limit(gru, asid);
158 gru_dbg(grudev, "gid %d, asid 0x%x\n", gru->gs_gid, asid);
159 return asid;
242 int asid;
245 asid = asids->mt_asid;
248 if (asid == 0 || (asids->mt_ctxbitmap == 0 && asids->mt_asid_gen !=
250 asid = gru_assign_asid(gru);
251 asids->mt_asid = asid;
266 "gid %d, gts %p, gms %p, ctxnum %d, asid 0x%x, asidmap 0x%lx\n",
267 gru->gs_gid, gts, gms, gts->ts_ctxnum, asid,
269 return asid;
594 int i, err, asid, ctxnum = gts->ts_ctxnum;
625 asid = gru_load_mm_tracker(gru, gts);
627 cch->asid[i] = asid + i;