arm64: fix endianness annotation in aarch64_insn_read()
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Wed, 28 Jun 2017 14:58:09 +0000 (16:58 +0200)
committerWill Deacon <will.deacon@arm.com>
Thu, 29 Jun 2017 10:02:42 +0000 (11:02 +0100)
commit65de142143206c7ffd98b0fcb062a79b3c6f1934
treea53d283105affccea93f5c0189bb5d8af0f9e605
parent6cf5d4af83e04f4cfae91bfdefd9d4d6949c09b2
arm64: fix endianness annotation in aarch64_insn_read()

The function arch64_insn_read() is used to read an instruction.
On AM64 instructions are always stored in little-endian order
and thus the function correctly do a little-to-native endian
conversion to the value just read.

However, the variable used to hold the value before the conversion
is not declared for a little-endian value but for a native one.

Fix this by using the correct type for the declaration: __le32

Note: This only works because the function reading the value,
      probe_kernel_read((), takes a void pointer and void pointers
      are endian-agnostic. Otherwise probe_kernel_read() should
      also be properly annotated (or worse, need to be specialized).

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/insn.c