diff options
| author | Runmin Wang <runminw@codeaurora.org> | 2016-02-18 10:34:53 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-25 16:02:23 -0700 |
| commit | 3bf887dc5afa8d31a55e216b22475d77f253fe21 (patch) | |
| tree | 4c2801582979269224f93010d637c03e47bab178 | |
| parent | 5fcc7c00d1ab9623a48eb298c5175c89804231b0 (diff) | |
soc: qcom: Increase the retry timeout to 2 seconds
Increase the scm retry timeout to 2 seconds and add a warning
message if the call takes longer than 1 second.
CRs-Fixed: 975433
Change-Id: I7719df41e491c9a8c80b8547de14bc8c71bf7c8d
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
| -rw-r--r-- | drivers/soc/qcom/scm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/soc/qcom/scm.c b/drivers/soc/qcom/scm.c index 978759d494f8..e90544bb84e4 100644 --- a/drivers/soc/qcom/scm.c +++ b/drivers/soc/qcom/scm.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2015, The Linux Foundation. All rights reserved. +/* Copyright (c) 2010-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -46,7 +46,7 @@ static DEFINE_MUTEX(scm_lock); DEFINE_MUTEX(scm_lmh_lock); #define SCM_EBUSY_WAIT_MS 30 -#define SCM_EBUSY_MAX_RETRY 20 +#define SCM_EBUSY_MAX_RETRY 67 #define N_EXT_SCM_ARGS 7 #define FIRST_EXT_ARG_IDX 3 @@ -332,6 +332,8 @@ static int _scm_call_retry(u32 svc_id, u32 cmd_id, const void *cmd_buf, resp_buf, resp_len, cmd, len); if (ret == SCM_EBUSY) msleep(SCM_EBUSY_WAIT_MS); + if (retry_count == 33) + pr_warn("scm: secure world has been busy for 1 second!\n"); } while (ret == SCM_EBUSY && (retry_count++ < SCM_EBUSY_MAX_RETRY)); if (ret == SCM_EBUSY) @@ -685,6 +687,8 @@ int scm_call2(u32 fn_id, struct scm_desc *desc) if (ret == SCM_V2_EBUSY) msleep(SCM_EBUSY_WAIT_MS); + if (retry_count == 33) + pr_warn("scm: secure world has been busy for 1 second!\n"); } while (ret == SCM_V2_EBUSY && (retry_count++ < SCM_EBUSY_MAX_RETRY)); if (ret < 0) |
