smcinvoke: release lock before sleep

Release g_smcinvoke_lock before sleep, to avoid
LLKD crash for holding lock for longer period of
time if TZ is busy.

Change-Id: Ie9523bc81f3aa03497836f06180c9d3f8a8efc9f
Signed-off-by: Monika Singh <monising@codeaurora.org>
This commit is contained in:
Monika Singh 2021-07-19 18:07:52 +05:30 committed by Gerrit - the friendly Code Review server
parent 0a69438bf7
commit e8e63e2a6e

View File

@ -1322,7 +1322,9 @@ static int prepare_send_scm_msg(const uint8_t *in_buf, phys_addr_t in_paddr,
if (ret == -EBUSY) {
pr_err("Secure side is busy,will retry after 30 ms\n");
mutex_unlock(&g_smcinvoke_lock);
msleep(SMCINVOKE_SCM_EBUSY_WAIT_MS);
mutex_lock(&g_smcinvoke_lock);
}
} while ((ret == -EBUSY) &&