arm64: add PSR_AA32_* definitions
authorMark Rutland <mark.rutland@arm.com>
Thu, 5 Jul 2018 14:16:48 +0000 (15:16 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 5 Jul 2018 16:23:17 +0000 (17:23 +0100)
commit25086263425641c74123f9387426c23072b299ea
treedb7055e105214544b6bcee3e34c67c8127ed4c3a
parent314d53d297980676011e6fd83dac60db4a01dc70
arm64: add PSR_AA32_* definitions

The AArch32 CPSR/SPSR format is *almost* identical to the AArch64
SPSR_ELx format for exceptions taken from AArch32, but the two have
diverged with the addition of DIT, and we need to treat the two as
logically distinct.

This patch adds new definitions for the SPSR_ELx format for exceptions
taken from AArch32, with a consistent PSR_AA32_ prefix. The existing
COMPAT_PSR_ definitions will be used for the PSR format as seen from
AArch32.

Definitions of DIT are provided for both, and inline functions are
provided to map between the two formats. Note that for SPSR_ELx, the
(RES0) J bit has been re-allocated as the DIT bit.

Once users of the COMPAT_PSR definitions have been migrated over to the
PSR_AA32 definitions, the (majority of) the former will be removed, so
no efforts is made to avoid duplication until then.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christoffer Dall <christoffer.dall@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Suzuki Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/ptrace.h