arm64: fix endianness annotation for __apply_alternatives()/get_alt_insn()
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Thu, 29 Jun 2017 14:40:12 +0000 (16:40 +0200)
committerWill Deacon <will.deacon@arm.com>
Thu, 29 Jun 2017 15:32:43 +0000 (16:32 +0100)
commit15ad6ace52039c7e39435c4d712d147126604a97
tree5c87dfb20f4b40b25edda331e5b8fbda264d4fa4
parent67831edf8a826750b43d5612792a9c3bc449f227
arm64: fix endianness annotation for __apply_alternatives()/get_alt_insn()

get_alt_insn() is used to read and create ARM instructions, which
are always stored in memory in little-endian order. These values
are thus correctly converted to/from native order when processed
but the pointers used to hold the address of these instructions
are declared as for native order values.

Fix this by declaring the pointers as __le32* instead of u32* and
make the few appropriate needed changes like removing the unneeded
cast '(u32*)' in front of __ALT_PTR()'s definition.

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