Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1732598 > unrolled thread
| Started by | Chris Lew <clew@codeaurora.org> |
|---|---|
| First post | 2017-09-14 23:30 +0200 |
| Last post | 2017-09-15 20:50 +0200 |
| Articles | 8 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH v2 0/5] Qualcomm SMEM V12 Support Chris Lew <clew@codeaurora.org> - 2017-09-14 23:30 +0200
[PATCH v2 1/5] soc: qcom: smem: Use le32_to_cpu for partition size comparison Chris Lew <clew@codeaurora.org> - 2017-09-14 23:30 +0200
Re: [PATCH v2 1/5] soc: qcom: smem: Use le32_to_cpu for partition size comparison Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-09-15 03:10 +0200
Re: [PATCH v2 1/5] soc: qcom: smem: Use le32_to_cpu for partition size comparison Stephen Boyd <sboyd@codeaurora.org> - 2017-09-15 20:40 +0200
Re: [PATCH v2 1/5] soc: qcom: smem: Use le32_to_cpu for partition size comparison Stephen Boyd <sboyd@codeaurora.org> - 2017-09-15 20:40 +0200
Re: [PATCH v2 1/5] soc: qcom: smem: Use le32_to_cpu for partition size comparison Chris Lew <clew@codeaurora.org> - 2017-09-15 23:00 +0200
[PATCH v2 5/5] soc: qcom: smem: Increase the number of hosts Chris Lew <clew@codeaurora.org> - 2017-09-14 23:30 +0200
Re: [PATCH v2 5/5] soc: qcom: smem: Increase the number of hosts Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-09-15 20:50 +0200
| From | Chris Lew <clew@codeaurora.org> |
|---|---|
| Date | 2017-09-14 23:30 +0200 |
| Subject | [PATCH v2 0/5] Qualcomm SMEM V12 Support |
| Message-ID | <upJRT-1Rr-3@gated-at.bofh.it> |
SMEM V12 was devised to make better use of the global SMEM region. The global heap region is formatted to be similar to a private partition. This allows the maximum number of smem items to increase. The maximum item number is written by the bootloader in a region after the table of contents. The number of hosts are increased for later chipsets. This patchset depends on patch: Qualcomm SMEM cached item support Chris Lew (5): soc: qcom: smem: Use le32_to_cpu for partition size comparison soc: qcom: smem: Read version by using the smem header soc: qcom: smem: Support global partition soc: qcom: smem: Support dynamic item limit soc: qcom: smem: Increase the number of hosts drivers/soc/qcom/smem.c | 248 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 195 insertions(+), 53 deletions(-) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
[toc] | [next] | [standalone]
| From | Chris Lew <clew@codeaurora.org> |
|---|---|
| Date | 2017-09-14 23:30 +0200 |
| Subject | [PATCH v2 1/5] soc: qcom: smem: Use le32_to_cpu for partition size comparison |
| Message-ID | <upJRU-1Rr-25@gated-at.bofh.it> |
| In reply to | #1732598 |
Endianness can vary in the system, add le32_to_cpu when comparing
size values from smem.
Signed-off-by: Chris Lew <clew@codeaurora.org>
---
Changes since v1:
- New change
drivers/soc/qcom/smem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
index c28275be0038..db04c45d4132 100644
--- a/drivers/soc/qcom/smem.c
+++ b/drivers/soc/qcom/smem.c
@@ -698,7 +698,7 @@ static int qcom_smem_enumerate_partitions(struct qcom_smem *smem,
return -EINVAL;
}
- if (header->size != entry->size) {
+ if (le32_to_cpu(header->size) != le32_to_cpu(entry->size)) {
dev_err(smem->dev,
"Partition %d has invalid size\n", i);
return -EINVAL;
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
[toc] | [prev] | [next] | [standalone]
| From | Bjorn Andersson <bjorn.andersson@linaro.org> |
|---|---|
| Date | 2017-09-15 03:10 +0200 |
| Subject | Re: [PATCH v2 1/5] soc: qcom: smem: Use le32_to_cpu for partition size comparison |
| Message-ID | <upNiO-4aG-7@gated-at.bofh.it> |
| In reply to | #1732599 |
On Thu 14 Sep 14:24 PDT 2017, Chris Lew wrote:
> Endianness can vary in the system, add le32_to_cpu when comparing
> size values from smem.
>
> Signed-off-by: Chris Lew <clew@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> ---
>
> Changes since v1:
> - New change
>
> drivers/soc/qcom/smem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
> index c28275be0038..db04c45d4132 100644
> --- a/drivers/soc/qcom/smem.c
> +++ b/drivers/soc/qcom/smem.c
> @@ -698,7 +698,7 @@ static int qcom_smem_enumerate_partitions(struct qcom_smem *smem,
> return -EINVAL;
> }
>
> - if (header->size != entry->size) {
> + if (le32_to_cpu(header->size) != le32_to_cpu(entry->size)) {
> dev_err(smem->dev,
> "Partition %d has invalid size\n", i);
> return -EINVAL;
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
[toc] | [prev] | [next] | [standalone]
| From | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| Date | 2017-09-15 20:40 +0200 |
| Subject | Re: [PATCH v2 1/5] soc: qcom: smem: Use le32_to_cpu for partition size comparison |
| Message-ID | <uq3GV-6Mo-7@gated-at.bofh.it> |
| In reply to | #1732599 |
On 09/14, Chris Lew wrote: > Endianness can vary in the system, add le32_to_cpu when comparing > size values from smem. > > Signed-off-by: Chris Lew <clew@codeaurora.org> > --- Fixes: tag? -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
[toc] | [prev] | [next] | [standalone]
| From | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| Date | 2017-09-15 20:40 +0200 |
| Subject | Re: [PATCH v2 1/5] soc: qcom: smem: Use le32_to_cpu for partition size comparison |
| Message-ID | <uq3GV-6Mo-13@gated-at.bofh.it> |
| In reply to | #1732599 |
On 09/14, Chris Lew wrote:
> Endianness can vary in the system, add le32_to_cpu when comparing
> size values from smem.
>
> Signed-off-by: Chris Lew <clew@codeaurora.org>
> ---
>
> Changes since v1:
> - New change
>
> drivers/soc/qcom/smem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
> index c28275be0038..db04c45d4132 100644
> --- a/drivers/soc/qcom/smem.c
> +++ b/drivers/soc/qcom/smem.c
> @@ -698,7 +698,7 @@ static int qcom_smem_enumerate_partitions(struct qcom_smem *smem,
> return -EINVAL;
> }
>
> - if (header->size != entry->size) {
> + if (le32_to_cpu(header->size) != le32_to_cpu(entry->size)) {
Also, it doesn't really matter. We're comparing two numbers with
the same endianness, so comparing them for equality before or
after swapping makes no difference. Sparse also (correctly)
doesn't complain here, because adding the conversion is not
necessary. Drop this patch?
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
[toc] | [prev] | [next] | [standalone]
| From | Chris Lew <clew@codeaurora.org> |
|---|---|
| Date | 2017-09-15 23:00 +0200 |
| Subject | Re: [PATCH v2 1/5] soc: qcom: smem: Use le32_to_cpu for partition size comparison |
| Message-ID | <uq5Sq-89G-5@gated-at.bofh.it> |
| In reply to | #1733013 |
On 9/15/2017 11:39 AM, Stephen Boyd wrote:
> On 09/14, Chris Lew wrote:
>> Endianness can vary in the system, add le32_to_cpu when comparing
>> size values from smem.
>>
>> Signed-off-by: Chris Lew <clew@codeaurora.org>
>> ---
>>
>> Changes since v1:
>> - New change
>>
>> drivers/soc/qcom/smem.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
>> index c28275be0038..db04c45d4132 100644
>> --- a/drivers/soc/qcom/smem.c
>> +++ b/drivers/soc/qcom/smem.c
>> @@ -698,7 +698,7 @@ static int qcom_smem_enumerate_partitions(struct qcom_smem *smem,
>> return -EINVAL;
>> }
>>
>> - if (header->size != entry->size) {
>> + if (le32_to_cpu(header->size) != le32_to_cpu(entry->size)) {
>
> Also, it doesn't really matter. We're comparing two numbers with
> the same endianness, so comparing them for equality before or
> after swapping makes no difference. Sparse also (correctly)
> doesn't complain here, because adding the conversion is not
> necessary. Drop this patch?
>
Hey Bjorn, should we remove this patch? You had flagged this comparison
in the first version of the global partition changes.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
[toc] | [prev] | [next] | [standalone]
| From | Chris Lew <clew@codeaurora.org> |
|---|---|
| Date | 2017-09-14 23:30 +0200 |
| Subject | [PATCH v2 5/5] soc: qcom: smem: Increase the number of hosts |
| Message-ID | <upJRU-1Rr-27@gated-at.bofh.it> |
| In reply to | #1732598 |
Increase the maximum number of hosts in a system to 10. Signed-off-by: Chris Lew <clew@codeaurora.org> --- Changes since v1: - None drivers/soc/qcom/smem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c index 2f3b1e1a8904..086f31b6c584 100644 --- a/drivers/soc/qcom/smem.c +++ b/drivers/soc/qcom/smem.c @@ -91,7 +91,7 @@ #define SMEM_GLOBAL_HOST 0xfffe /* Max number of processors/hosts in a system */ -#define SMEM_HOST_COUNT 9 +#define SMEM_HOST_COUNT 10 /** * struct smem_proc_comm - proc_comm communication struct (legacy) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
[toc] | [prev] | [next] | [standalone]
| From | Bjorn Andersson <bjorn.andersson@linaro.org> |
|---|---|
| Date | 2017-09-15 20:50 +0200 |
| Subject | Re: [PATCH v2 5/5] soc: qcom: smem: Increase the number of hosts |
| Message-ID | <uq3QD-6Q2-25@gated-at.bofh.it> |
| In reply to | #1732600 |
On Thu 14 Sep 14:25 PDT 2017, Chris Lew wrote: > Increase the maximum number of hosts in a system to 10. > > Signed-off-by: Chris Lew <clew@codeaurora.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Regards, Bjorn > --- > > Changes since v1: > - None > > drivers/soc/qcom/smem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c > index 2f3b1e1a8904..086f31b6c584 100644 > --- a/drivers/soc/qcom/smem.c > +++ b/drivers/soc/qcom/smem.c > @@ -91,7 +91,7 @@ > #define SMEM_GLOBAL_HOST 0xfffe > > /* Max number of processors/hosts in a system */ > -#define SMEM_HOST_COUNT 9 > +#define SMEM_HOST_COUNT 10 > > /** > * struct smem_proc_comm - proc_comm communication struct (legacy) > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web