linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Elliot Berman <eberman@codeaurora.org>
Cc: Jonathan McDowell <noodles@earth.li>,
	Andy Gross <agross@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] firmware: qcom_scm: Fix legacy convention SCM accessors
Date: Mon, 13 Jul 2020 11:42:30 -0700	[thread overview]
Message-ID: <20200713184230.GB1218486@builder.lan> (raw)
In-Reply-To: <d38c8e7c-443c-33f0-be8d-dedd58dd4fe1@codeaurora.org>

On Mon 13 Jul 09:35 PDT 2020, Elliot Berman wrote:

> For the Qualcomm TrustZone firmwares which I am familiar with:
> 
> Reviewed-by: Elliot Berman <eberman@codeaurora.org>
> 

Thanks for the patch Jonathan and thanks for the review Elliot!

Applied

Regards,
Bjorn

> On 7/4/2020 10:23 AM, Jonathan McDowell wrote:
> > The move to a combined driver for the QCOM SCM hardware changed the
> > io_writel and io_readl helpers to use non-atomic calls, despite the
> > commit message saying that atomic was a better option. This breaks these
> > helpers on hardware that uses the old legacy convention (access fails
> > with a -95 return code). Switch back to using the atomic calls.
> > 
> > Observed as a failure routing GPIO interrupts to the Apps processor on
> > an IPQ8064; fix is confirmed as correctly allowing the interrupts to be
> > routed and observed.
> > 
> > Fixes: 57d3b816718c ("firmware: qcom_scm: Remove thin wrappers")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Jonathan McDowell <noodles@earth.li>
> > ---
> >  drivers/firmware/qcom_scm.c | 7 +++----
> >  1 file changed, 3 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
> > index 0e7233a20f34..d4fda210adfe 100644
> > --- a/drivers/firmware/qcom_scm.c
> > +++ b/drivers/firmware/qcom_scm.c
> > @@ -391,7 +391,7 @@ static int __qcom_scm_set_dload_mode(struct device *dev, bool enable)
> >  
> >  	desc.args[1] = enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0;
> >  
> > -	return qcom_scm_call(__scm->dev, &desc, NULL);
> > +	return qcom_scm_call_atomic(__scm->dev, &desc, NULL);
> >  }
> >  
> >  static void qcom_scm_set_download_mode(bool enable)
> > @@ -650,7 +650,7 @@ int qcom_scm_io_readl(phys_addr_t addr, unsigned int *val)
> >  	int ret;
> >  
> >  
> > -	ret = qcom_scm_call(__scm->dev, &desc, &res);
> > +	ret = qcom_scm_call_atomic(__scm->dev, &desc, &res);
> >  	if (ret >= 0)
> >  		*val = res.result[0];
> >  
> > @@ -669,8 +669,7 @@ int qcom_scm_io_writel(phys_addr_t addr, unsigned int val)
> >  		.owner = ARM_SMCCC_OWNER_SIP,
> >  	};
> >  
> > -
> > -	return qcom_scm_call(__scm->dev, &desc, NULL);
> > +	return qcom_scm_call_atomic(__scm->dev, &desc, NULL);
> >  }
> >  EXPORT_SYMBOL(qcom_scm_io_writel);
> >  
> > 
> 
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project

      reply	other threads:[~2020-07-13 18:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-04 17:23 [PATCH] firmware: qcom_scm: Fix legacy convention SCM accessors Jonathan McDowell
2020-07-13 16:35 ` Elliot Berman
2020-07-13 18:42   ` Bjorn Andersson [this message]

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=20200713184230.GB1218486@builder.lan \
    --to=bjorn.andersson@linaro.org \
    --cc=agross@kernel.org \
    --cc=eberman@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noodles@earth.li \
    /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).