summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/acpi_parking_protocol.c
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-06-28 17:58:07 +0300
committerWill Deacon <will.deacon@arm.com>2017-06-29 13:33:15 +0300
commitf0cda7e6dc5893b4b4daa3440512fc1226bc983f (patch)
treebff7d36673771f1704435fc9abb96a75b0ec87f7 /arch/arm64/kernel/acpi_parking_protocol.c
parentc0d109de4c0ca365a2bd180e2e65501196fa8ef4 (diff)
downloadlinux-f0cda7e6dc5893b4b4daa3440512fc1226bc983f.tar.xz
arm64: fix endianness annotation in acpi_parking_protocol.c
Here both variables 'cpu_id' and 'entry_point' are read via read[lq]_relaxed(), from a little-endian annotated pointer and then used as a native endian value. This is correct since the read[lq]() family of function internally do a little-to-native endian conversion. But in this case, it is wrong to declare these variable as little-endian since there are native ones. Fix this by changing the declaration of these variables as 'u32' or 'u64' instead of '__le32' / '__le64'. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/acpi_parking_protocol.c')
-rw-r--r--arch/arm64/kernel/acpi_parking_protocol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/kernel/acpi_parking_protocol.c b/arch/arm64/kernel/acpi_parking_protocol.c
index f35e80aad378..98a20e58758b 100644
--- a/arch/arm64/kernel/acpi_parking_protocol.c
+++ b/arch/arm64/kernel/acpi_parking_protocol.c
@@ -71,7 +71,7 @@ static int acpi_parking_protocol_cpu_boot(unsigned int cpu)
{
struct cpu_mailbox_entry *cpu_entry = &cpu_mailbox_entries[cpu];
struct parking_protocol_mailbox __iomem *mailbox;
- __le32 cpu_id;
+ u32 cpu_id;
/*
* Map mailbox memory with attribute device nGnRE (ie ioremap -
@@ -123,7 +123,7 @@ static void acpi_parking_protocol_cpu_postboot(void)
int cpu = smp_processor_id();
struct cpu_mailbox_entry *cpu_entry = &cpu_mailbox_entries[cpu];
struct parking_protocol_mailbox __iomem *mailbox = cpu_entry->mailbox;
- __le64 entry_point;
+ u64 entry_point;
entry_point = readq_relaxed(&mailbox->entry_point);
/*