summaryrefslogtreecommitdiffstats
path: root/drivers/tee
diff options
context:
space:
mode:
authortiger-yu99 <tigeryu99@hotmail.com>2017-05-06 00:20:32 +0800
committerJens Wiklander <jens.wiklander@linaro.org>2017-08-04 10:30:27 +0200
commita9980e947ec97297e03d2332d6beff06f5131a98 (patch)
tree766d584304b6377dfec081391144347291f98075 /drivers/tee
parent96e72ddeec4546fda0e194298c2ee39e394a3ab7 (diff)
downloadop-kernel-dev-a9980e947ec97297e03d2332d6beff06f5131a98.zip
op-kernel-dev-a9980e947ec97297e03d2332d6beff06f5131a98.tar.gz
tee: optee: interruptible RPC sleep
Prior to this patch RPC sleep was uninterruptible since msleep() is uninterruptible. Change to use msleep_interruptible() instead. Signed-off-by: Tiger Yu <tigeryu99@hotmail.com> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'drivers/tee')
-rw-r--r--drivers/tee/optee/rpc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/tee/optee/rpc.c b/drivers/tee/optee/rpc.c
index 8814eca..9488ed1 100644
--- a/drivers/tee/optee/rpc.c
+++ b/drivers/tee/optee/rpc.c
@@ -140,11 +140,8 @@ static void handle_rpc_func_cmd_wait(struct optee_msg_arg *arg)
msec_to_wait = arg->params[0].u.value.a;
- /* set task's state to interruptible sleep */
- set_current_state(TASK_INTERRUPTIBLE);
-
- /* take a nap */
- msleep(msec_to_wait);
+ /* Go to interruptible sleep */
+ msleep_interruptible(msec_to_wait);
arg->ret = TEEC_SUCCESS;
return;
OpenPOWER on IntegriCloud