diff options
author | Etienne Carriere <etienne.carriere@foss.st.com> | 2023-10-30 09:48:12 +0100 |
---|---|---|
committer | Jens Wiklander <jens.wiklander@linaro.org> | 2023-11-17 15:48:03 +0100 |
commit | 4b391c9c37646f25118355f414b9e6d9fefe782f (patch) | |
tree | c05c3b50580c5f0fb6b65384062d7a18d3cdfa7e /drivers/firmware/arm_scmi | |
parent | 45bc2c9b5b230b95cad10f44204d7b28f52b74c0 (diff) | |
download | lwn-4b391c9c37646f25118355f414b9e6d9fefe782f.tar.gz lwn-4b391c9c37646f25118355f414b9e6d9fefe782f.zip |
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 <sudeep.holla@arm.com>
Cc: Cristian Marussi <cristian.marussi@arm.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'drivers/firmware/arm_scmi')
-rw-r--r-- | drivers/firmware/arm_scmi/optee.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/firmware/arm_scmi/optee.c b/drivers/firmware/arm_scmi/optee.c index e123de6e8c67..25bfb465484d 100644 --- a/drivers/firmware/arm_scmi/optee.c +++ b/drivers/firmware/arm_scmi/optee.c @@ -440,6 +440,10 @@ static int scmi_optee_chan_setup(struct scmi_chan_info *cinfo, struct device *de if (ret) goto err_free_shm; + ret = tee_client_system_session(scmi_optee_private->tee_ctx, channel->tee_session); + if (ret) + dev_warn(dev, "Could not switch to system session, do best effort\n"); + ret = get_channel(channel); if (ret) goto err_close_sess; |