Skip to content

Commit fd85e21

Browse files
etienne-lmsjforissier
authored andcommitted
firmware: arm_scmi: optee: use optee system invocation
Changes SCMI optee transport to call tee_client_system_session() to request optee driver to provision an entry context in OP-TEE for processing OP-TEE messages. This prevents possible deadlock in case OP-TEE threads are all consumed while these may be waiting for a clock or regulator to be enable which SCMI OP-TEE service which requires a free thread context to execute. Cc: Sudeep Holla <[email protected]> Cc: Cristian Marussi <[email protected]> Acked-by: Sudeep Holla <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Etienne Carriere <[email protected]> Signed-off-by: Jens Wiklander <[email protected]>
1 parent c3dc99d commit fd85e21

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/firmware/arm_scmi/optee.c

+4
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,10 @@ static int scmi_optee_chan_setup(struct scmi_chan_info *cinfo, struct device *de
440440
if (ret)
441441
goto err_free_shm;
442442

443+
ret = tee_client_system_session(scmi_optee_private->tee_ctx, channel->tee_session);
444+
if (ret)
445+
dev_warn(dev, "Could not switch to system session, do best effort\n");
446+
443447
ret = get_channel(channel);
444448
if (ret)
445449
goto err_close_sess;

0 commit comments

Comments
 (0)