Lines Matching refs:ctxnum
479 static void gru_load_context_data(void *save, void *grubase, int ctxnum, in gru_load_context_data() argument
487 gseg = grubase + ctxnum * GRU_GSEG_STRIDE; in gru_load_context_data()
515 static void gru_unload_context_data(void *save, void *grubase, int ctxnum, in gru_unload_context_data() argument
522 gseg = grubase + ctxnum * GRU_GSEG_STRIDE; in gru_unload_context_data()
546 int ctxnum = gts->ts_ctxnum; in gru_unload_context() local
550 cch = get_cch(gru->gs_gru_base_vaddr, ctxnum); in gru_unload_context()
562 ctxnum, gts->ts_cbr_map, in gru_unload_context()
582 int i, err, asid, ctxnum = gts->ts_ctxnum; in gru_load_context() local
584 cch = get_cch(gru->gs_gru_base_vaddr, ctxnum); in gru_load_context()
628 gru_load_context_data(gts->ts_gdata, gru->gs_gru_base_vaddr, ctxnum, in gru_load_context()
649 int i, ctxnum = gts->ts_ctxnum, ret = 0; in gru_update_cch() local
651 cch = get_cch(gru->gs_gru_base_vaddr, ctxnum); in gru_update_cch()
784 int ctxnum, ctxnum0, flag = 0, cbr, dsr; in gru_steal_context() local
796 ctxnum = next_ctxnum(blade->bs_lru_ctxnum); in gru_steal_context()
798 if (ctxnum == 0) in gru_steal_context()
801 blade->bs_lru_ctxnum = ctxnum; in gru_steal_context()
802 ctxnum0 = ctxnum; in gru_steal_context()
809 for (; ctxnum < GRU_NUM_CCH; ctxnum++) { in gru_steal_context()
810 if (flag && gru == gru0 && ctxnum == ctxnum0) in gru_steal_context()
812 ngts = gru->gs_gts[ctxnum]; in gru_steal_context()
824 if (ngts || (flag && gru == gru0 && ctxnum == ctxnum0)) in gru_steal_context()
830 ctxnum = 0; in gru_steal_context()
846 gru->gs_gid, ctxnum, ngts, cbr, dsr, hweight64(gru->gs_cbr_map), in gru_steal_context()
855 int ctxnum; in gru_assign_context_number() local
857 ctxnum = find_first_zero_bit(&gru->gs_context_map, GRU_NUM_CCH); in gru_assign_context_number()
858 __set_bit(ctxnum, &gru->gs_context_map); in gru_assign_context_number()
859 return ctxnum; in gru_assign_context_number()