arm64: Fix compat register mappings
authorRobin Murphy <robin.murphy@arm.com>
Thu, 22 Oct 2015 14:41:52 +0000 (15:41 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 29 Oct 2015 16:55:15 +0000 (16:55 +0000)
commit5accd17d0eb523350c9ef754d655e379c9bb93b3
treef259007ba4cba9b193f6fe9fcd7d3d977af0a12c
parent97303480753e48fb313dc0e15daaf11b0451cdb8
arm64: Fix compat register mappings

For reasons not entirely apparent, but now enshrined in history, the
architectural mapping of AArch32 banked registers to AArch64 registers
actually orders SP_<mode> and LR_<mode> backwards compared to the
intuitive r13/r14 order, for all modes except FIQ.

Fix the compat_<reg>_<mode> macros accordingly, in the hope of avoiding
subtle bugs with KVM and AArch32 guests.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/ptrace.h