Lines Matching refs:context_tbl

166 	for (i = 0; i < ARRAY_SIZE(space->context_tbl); i++)  in tpm2_flush_space()
167 if (space->context_tbl[i] && ~space->context_tbl[i]) in tpm2_flush_space()
168 tpm2_flush_context(chip, space->context_tbl[i]); in tpm2_flush_space()
180 for (i = 0, offset = 0; i < ARRAY_SIZE(space->context_tbl); i++) { in tpm2_load_space()
181 if (!space->context_tbl[i]) in tpm2_load_space()
185 if (~space->context_tbl[i]) { in tpm2_load_space()
191 &space->context_tbl[i]); in tpm2_load_space()
228 if (i >= ARRAY_SIZE(space->context_tbl) || !space->context_tbl[i]) in tpm2_map_to_phandle()
231 phandle = space->context_tbl[i]; in tpm2_map_to_phandle()
310 memcpy(&chip->work_space.context_tbl, &space->context_tbl, in tpm2_prepare_space()
311 sizeof(space->context_tbl)); in tpm2_prepare_space()
353 for (i = 0; i < ARRAY_SIZE(space->context_tbl); i++) { in tpm2_map_to_vhandle()
355 if (!space->context_tbl[i]) { in tpm2_map_to_vhandle()
356 space->context_tbl[i] = phandle; in tpm2_map_to_vhandle()
359 } else if (space->context_tbl[i] == phandle) in tpm2_map_to_vhandle()
363 if (i == ARRAY_SIZE(space->context_tbl)) in tpm2_map_to_vhandle()
490 for (i = 0, offset = 0; i < ARRAY_SIZE(space->context_tbl); i++) { in tpm2_save_space()
491 if (!(space->context_tbl[i] && ~space->context_tbl[i])) in tpm2_save_space()
494 rc = tpm2_save_context(chip, space->context_tbl[i], in tpm2_save_space()
498 space->context_tbl[i] = 0; in tpm2_save_space()
503 tpm2_flush_context(chip, space->context_tbl[i]); in tpm2_save_space()
504 space->context_tbl[i] = ~0; in tpm2_save_space()
556 memcpy(&space->context_tbl, &chip->work_space.context_tbl, in tpm2_commit_space()
557 sizeof(space->context_tbl)); in tpm2_commit_space()