Lines Matching refs:context_tbl
169 for (i = 0; i < ARRAY_SIZE(space->context_tbl); i++) in tpm2_flush_space()
170 if (space->context_tbl[i] && ~space->context_tbl[i]) in tpm2_flush_space()
171 tpm2_flush_context(chip, space->context_tbl[i]); in tpm2_flush_space()
183 for (i = 0, offset = 0; i < ARRAY_SIZE(space->context_tbl); i++) { in tpm2_load_space()
184 if (!space->context_tbl[i]) in tpm2_load_space()
188 if (~space->context_tbl[i]) { in tpm2_load_space()
194 &space->context_tbl[i]); in tpm2_load_space()
231 if (i >= ARRAY_SIZE(space->context_tbl) || !space->context_tbl[i]) in tpm2_map_to_phandle()
234 phandle = space->context_tbl[i]; in tpm2_map_to_phandle()
313 memcpy(&chip->work_space.context_tbl, &space->context_tbl, in tpm2_prepare_space()
314 sizeof(space->context_tbl)); in tpm2_prepare_space()
358 for (i = 0; i < ARRAY_SIZE(space->context_tbl); i++) { in tpm2_map_to_vhandle()
360 if (!space->context_tbl[i]) { in tpm2_map_to_vhandle()
361 space->context_tbl[i] = phandle; in tpm2_map_to_vhandle()
364 } else if (space->context_tbl[i] == phandle) in tpm2_map_to_vhandle()
368 if (i == ARRAY_SIZE(space->context_tbl)) in tpm2_map_to_vhandle()
498 for (i = 0, offset = 0; i < ARRAY_SIZE(space->context_tbl); i++) { in tpm2_save_space()
499 if (!(space->context_tbl[i] && ~space->context_tbl[i])) in tpm2_save_space()
502 rc = tpm2_save_context(chip, space->context_tbl[i], in tpm2_save_space()
506 space->context_tbl[i] = 0; in tpm2_save_space()
511 tpm2_flush_context(chip, space->context_tbl[i]); in tpm2_save_space()
512 space->context_tbl[i] = ~0; in tpm2_save_space()
563 memcpy(&space->context_tbl, &chip->work_space.context_tbl, in tpm2_commit_space()
564 sizeof(space->context_tbl)); in tpm2_commit_space()