[PATCH] ARM: qcom: Fix SCM interface for big-endian kernels
Stephen Boyd
sboyd at codeaurora.org
Tue Sep 23 10:42:23 PDT 2014
On 09/23/14 09:47, Kumar Gala wrote:
> On Sep 22, 2014, at 5:36 PM, Stephen Boyd <sboyd at 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 at codeaurora.org>
>> ---
>> drivers/soc/qcom/scm-boot.c | 8 ++++----
>> drivers/soc/qcom/scm.c | 34 ++++++++++++++++++----------------
>> 2 files changed, 22 insertions(+), 20 deletions(-)
>>
>> diff --git a/drivers/soc/qcom/scm-boot.c b/drivers/soc/qcom/scm-boot.c
>> index 60ff7b482141..3e4d77b371c6 100644
>> --- a/drivers/soc/qcom/scm-boot.c
>> +++ b/drivers/soc/qcom/scm-boot.c
>> @@ -27,12 +27,12 @@
>> int scm_set_boot_addr(phys_addr_t addr, int flags)
>> {
>> struct {
>> - unsigned int flags;
>> - phys_addr_t addr;
>> + __le32 flags;
>> + __le32 addr;
> Hmm, was phys_addr_t wrong here before? I ask because don’t we support LPAE on some systems?
Yes it was wrong. It is exactly 32 bits wide.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
More information about the linux-arm-kernel
mailing list