From: Andy Gross <andy.gross@linaro.org>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org, Will Deacon <will.deacon@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Stephen Boyd <sboyd@codeaurora.org>,
stanimir.varbanov@linaro.org, linux-kernel@vger.kernel.org,
patches@linaro.org, Bjorn Andersson <bjorn.andersson@linaro.org>,
Andy Gross <andy.gross@linaro.org>
Subject: [PATCH 2/2] firmware: qcom: scm: Fix interrupted SCM calls
Date: Sat, 20 Aug 2016 00:51:14 -0500 [thread overview]
Message-ID: <1471672274-19317-3-git-send-email-andy.gross@linaro.org> (raw)
In-Reply-To: <1471672274-19317-1-git-send-email-andy.gross@linaro.org>
This patch fixes an issue with the SCM64 calls. Sometimes SCM calls can
be interrupted and return early. When this happens, the contents of
register 6 will contain a session ID that is required when resuming the
SCM call.
Signed-off-by: Andy Gross <andy.gross@linaro.org>
---
drivers/firmware/qcom_scm-64.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/firmware/qcom_scm-64.c b/drivers/firmware/qcom_scm-64.c
index 4a0f5ea..1851294 100644
--- a/drivers/firmware/qcom_scm-64.c
+++ b/drivers/firmware/qcom_scm-64.c
@@ -131,10 +131,12 @@ static int qcom_scm_call(struct device *dev, u32 svc_id, u32 cmd_id,
qcom_smccc_convention,
ARM_SMCCC_OWNER_SIP, fn_id);
+ res->a6 = 0;
+
do {
arm_smccc_smc(cmd, desc->arginfo, desc->args[0],
- desc->args[1], desc->args[2], x5, 0, 0,
- res);
+ desc->args[1], desc->args[2], x5, res->a6,
+ 0, res);
} while (res->a0 == QCOM_SCM_INTERRUPTED);
mutex_unlock(&qcom_scm_lock);
--
1.9.1
next prev parent reply other threads:[~2016-08-20 5:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-20 5:51 [PATCH 0/2] Qualcomm SMCCC Session ID Support Andy Gross
2016-08-20 5:51 ` [PATCH 1/2] arm64: kernel: Add SMC Session ID to results Andy Gross
2016-08-22 13:43 ` Will Deacon
2016-08-22 14:02 ` Andy Gross
2016-08-22 14:53 ` Will Deacon
2016-08-22 15:16 ` Andy Gross
2016-08-23 12:39 ` Andy Gross
2016-08-23 0:38 ` Stephen Boyd
2016-08-23 9:07 ` Lorenzo Pieralisi
2016-08-23 10:38 ` Lorenzo Pieralisi
2016-08-23 12:36 ` Andy Gross
2016-08-30 20:16 ` Andy Gross
2016-08-31 14:36 ` Will Deacon
2016-08-24 18:24 ` Bjorn Andersson
2016-08-20 5:51 ` Andy Gross [this message]
2016-11-29 7:44 [PATCH 0/2] Support ARM SMCC SoC vendor quirks Andy Gross
2016-11-29 7:44 ` [PATCH 2/2] firmware: qcom: scm: Fix interrupted SCM calls Andy Gross
2016-12-06 11:54 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1471672274-19317-3-git-send-email-andy.gross@linaro.org \
--to=andy.gross@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@linaro.org \
--cc=sboyd@codeaurora.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=stanimir.varbanov@linaro.org \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).