linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sricharan R <sricharan@codeaurora.org>
To: patches@linaro.org, linux-arm-msm@vger.kernel.org,
	will.deacon@arm.com, stanimir.varbanov@linaro.org,
	linux-kernel@vger.kernel.org, srinivas.kandagatla@linaro.org,
	catalin.marinas@arm.com, andy.gross@linaro.org,
	bjorn.andersson@linaro.org, sboyd@codeaurora.org
Cc: sricharan@codeaurora.org
Subject: [PATCH] firmware: qcom: scm: Fix interrupted SCM calls fully
Date: Wed, 28 Sep 2016 16:12:28 +0530	[thread overview]
Message-ID: <1475059348-30510-1-git-send-email-sricharan@codeaurora.org> (raw)

Patch [1] fixes the issues with interrupted SCM64 calls
by returning the register r6 (Session ID) on the next try, but register
r0 also needs to be preserved for the retry. r0 contains the
result of the previous try. Without this i see that the SCM calls
hang when retried.

[1] https://patchwork.kernel.org/patch/9291589/

Signed-off-by: Sricharan R <sricharan@codeaurora.org>
---
 drivers/firmware/qcom_scm-64.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/firmware/qcom_scm-64.c b/drivers/firmware/qcom_scm-64.c
index 7ecd0e7..28b604e 100755
--- a/drivers/firmware/qcom_scm-64.c
+++ b/drivers/firmware/qcom_scm-64.c
@@ -134,6 +134,9 @@ static int qcom_scm_call(struct device *dev, u32 svc_id, u32 cmd_id,
 		res->a6 = 0;
 
 		do {
+			if (res->a0 == QCOM_SCM_INTERRUPTED)
+				cmd = res->a0;
+
 			arm_smccc_smc(cmd, desc->arginfo, desc->args[0],
 				      desc->args[1], desc->args[2], x5, res->a6, 0,
 				      res);
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

             reply	other threads:[~2016-09-28 10:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28 10:42 Sricharan R [this message]
2016-10-26 18:35 ` [PATCH] firmware: qcom: scm: Fix interrupted SCM calls fully Bjorn Andersson

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=1475059348-30510-1-git-send-email-sricharan@codeaurora.org \
    --to=sricharan@codeaurora.org \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=catalin.marinas@arm.com \
    --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).