From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Chris Lew <clew@codeaurora.org>
Cc: andy.gross@linaro.org, david.brown@linaro.org,
aneela@codeaurora.org, linux-arm-msm@vger.kernel.org,
linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] soc: qcom: smem: Support global partition
Date: Tue, 22 Aug 2017 17:32:25 -0700 [thread overview]
Message-ID: <20170823003225.GY29306@minitux> (raw)
In-Reply-To: <f8341ef7-8e88-595a-feab-d294da977ac5@codeaurora.org>
On Tue 22 Aug 17:28 PDT 2017, Chris Lew wrote:
> On 8/21/2017 10:17 AM, Bjorn Andersson wrote:
[..]
> > > +static int qcom_smem_set_global_partition(struct qcom_smem *smem,
> > > + struct smem_ptable_entry *entry)
> > > +{
[..]
> > > + if (header->size != entry->size) {
> >
> > This happens to work, because they are both in the same endian. But
> > please sprinkle some le32_to_cpu() here as well.
> >
>
>
> These checks mimic the sanity checks being done in enumerate_partitions.
> Should I create a patch to increase le32_to_cpu usage in
> qcom_smem_enumerate_partitions?
>
Oops, yeah please do, just for completeness sake.
[..]
> > > @@ -647,6 +714,12 @@ static int qcom_smem_enumerate_partitions(struct qcom_smem *smem,
> > > host0 = le16_to_cpu(entry->host0);
> > > host1 = le16_to_cpu(entry->host1);
> > > + if (host0 == SMEM_GLOBAL_HOST && host0 == host1) {
> > > + if (qcom_smem_set_global_partition(smem, entry))
> > > + return -EINVAL;
> > > + continue;
> > > + }
> > > +
> >
> > As you're not able to leverage any of the checks from this loop I think
> > it's cleaner to duplicate the traversal of the partition table in both
> > functions and call the "search for global partition" directly from
> > probe - if the version indicates there should be one.
> >
>
>
> Ok, will set the global partition in the version case statement and error
> out of the probe if finding the global partition fails since it is not
> optional in the new version.
>
Sounds good.
Regards,
Bjorn
next prev parent reply other threads:[~2017-08-23 0:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-18 1:15 [PATCH 0/3] Qualcomm SMEM V12 Support Chris Lew
2017-08-18 1:15 ` [PATCH 1/3] soc: qcom: smem: Support global partition Chris Lew
2017-08-21 6:05 ` Arun Kumar Neelakantam
2017-08-21 17:17 ` Bjorn Andersson
2017-08-23 0:28 ` Chris Lew
2017-08-23 0:32 ` Bjorn Andersson [this message]
2017-08-18 1:15 ` [PATCH 2/3] soc: qcom: smem: Support dynamic item limit Chris Lew
2017-08-21 8:57 ` Arun Kumar Neelakantam
2017-08-21 17:33 ` Bjorn Andersson
2017-08-18 1:15 ` [PATCH 3/3] soc: qcom: smem: Increase the number of hosts Chris Lew
2017-08-21 17:34 ` 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=20170823003225.GY29306@minitux \
--to=bjorn.andersson@linaro.org \
--cc=andy.gross@linaro.org \
--cc=aneela@codeaurora.org \
--cc=clew@codeaurora.org \
--cc=david.brown@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-soc@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.