linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: qcom: Fix SCM interface for big-endian kernels
Date: Thu, 22 Jan 2015 10:29:47 -0800	[thread overview]
Message-ID: <20150122182947.GK27202@codeaurora.org> (raw)
In-Reply-To: <EF8384DD-D1D4-40F8-BCD7-D6516E923120@codeaurora.org>

On 01/22, Kumar Gala wrote:
> 
> On Jan 21, 2015, at 1:21 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> 
> > The secure environment only runs in little-endian mode, so any
> > buffers shared with the secure environment should have their
> > contents converted to little-endian. We also mark such elements
> > with __le32 to allow sparse to catch such problems.
> > 
> > Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> > ---
> > 
> > Changes since v1:
> > * Rebased onto Kumar's qcom/soc branch
> > 
> > drivers/soc/qcom/scm-boot.c |  8 ++++----
> > drivers/soc/qcom/scm.c      | 30 ++++++++++++++++--------------
> > 2 files changed, 20 insertions(+), 18 deletions(-)
> > 
> > diff --git a/drivers/soc/qcom/scm-boot.c b/drivers/soc/qcom/scm-boot.c
> > index 1822b13bbc10..af16fcc8d5cb 100644
> > --- a/drivers/soc/qcom/scm-boot.c
> > +++ b/drivers/soc/qcom/scm-boot.c
> > @@ -27,12 +27,12 @@
> > int scm_set_boot_addr(u32 addr, int flags)
> > {
> > 	struct {
> > -		unsigned int flags;
> > -		phys_addr_t  addr;
> > +		__le32 flags;
> > +		__le32 addr;
> 
> How does this work?  How can we go from phys_addr_t back to __le32 on LPAE or 64-bit systems?
> 

I guess I missed updating this in the patch titled "Clarify boot
interface". In that patch we should have updated addr to be a u32
(or __le32 as is done here). From what I can tell by looking at
the codeaurora tree this is still 32 bits wide even on 64-bit
platforms.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

      reply	other threads:[~2015-01-22 18:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 19:21 [PATCH v2] ARM: qcom: Fix SCM interface for big-endian kernels Stephen Boyd
2015-01-22 17:05 ` Kumar Gala
2015-01-22 18:29   ` Stephen Boyd [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=20150122182947.GK27202@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).