From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756911AbcJZSfP (ORCPT ); Wed, 26 Oct 2016 14:35:15 -0400 Received: from mail-pf0-f174.google.com ([209.85.192.174]:33077 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754683AbcJZSfN (ORCPT ); Wed, 26 Oct 2016 14:35:13 -0400 Date: Wed, 26 Oct 2016 11:35:08 -0700 From: Bjorn Andersson To: andy.gross@linaro.org, Sricharan R Cc: 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, sboyd@codeaurora.org Subject: Re: [PATCH] firmware: qcom: scm: Fix interrupted SCM calls fully Message-ID: <20161026183508.GR7509@tuxbot> References: <1475059348-30510-1-git-send-email-sricharan@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1475059348-30510-1-git-send-email-sricharan@codeaurora.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 28 Sep 03:42 PDT 2016, Sricharan R wrote: > 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/ > Andy, this is needed as well on 8996 - or I get rcu stalls during firmware loading operations (so I guess it's busy spinning in that loop). Tested-by: Bjorn Andersson Regards, Bjorn > Signed-off-by: Sricharan R > --- > 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 >