Lines Matching refs:kgts
143 struct gru_thread_state *kgts; in gru_load_kernel_context() local
159 kgts = bs->bs_kgts; in gru_load_kernel_context()
161 if (!kgts->ts_gru) { in gru_load_kernel_context()
164 kgts->ts_cbr_au_count = GRU_CB_COUNT_TO_AU( in gru_load_kernel_context()
166 kgts->ts_dsr_au_count = GRU_DS_BYTES_TO_AU( in gru_load_kernel_context()
169 while (!gru_assign_gru_context(kgts)) { in gru_load_kernel_context()
171 gru_steal_context(kgts); in gru_load_kernel_context()
173 gru_load_context(kgts); in gru_load_kernel_context()
176 ctxnum = kgts->ts_ctxnum; in gru_load_kernel_context()
190 struct gru_thread_state *kgts; in gru_free_kernel_contexts() local
200 kgts = bs->bs_kgts; in gru_free_kernel_contexts()
201 if (kgts && kgts->ts_gru) in gru_free_kernel_contexts()
202 gru_unload_context(kgts, 0); in gru_free_kernel_contexts()
205 kfree(kgts); in gru_free_kernel_contexts()
292 struct gru_thread_state *kgts; in gru_reserve_async_resources() local
305 kgts = bs->bs_kgts; in gru_reserve_async_resources()
308 if (kgts && kgts->ts_gru) in gru_reserve_async_resources()
309 gru_unload_context(kgts, 0); in gru_reserve_async_resources()
389 struct gru_thread_state *kgts = NULL; in gru_get_cb_exception_detail() local
401 kgts = gru_base[bid]->bs_kgts; in gru_get_cb_exception_detail()
402 if (!kgts || !kgts->ts_gru) in gru_get_cb_exception_detail()
404 off = cb - kgts->ts_gru->gs_gru_base_vaddr; in gru_get_cb_exception_detail()
407 kgts = NULL; in gru_get_cb_exception_detail()
409 BUG_ON(!kgts); in gru_get_cb_exception_detail()
410 cbrnum = thread_cbr_number(kgts, get_cb_number(cb)); in gru_get_cb_exception_detail()