]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit09c3a9d1040b7736603e412a747e7d7b4b174cc3
treef259007ba4cba9b193f6fe9fcd7d3d977af0a12c
parent626710f1d2332bbe14b6a3e6eda6a72424dc5cc3
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