diff options
author | James Morse <james.morse@arm.com> | 2017-11-02 13:12:39 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-11-02 16:55:41 +0100 |
commit | b55a5a1b0a7d4f51b6c8eec0d4d78ace8f5fa2b3 (patch) | |
tree | 58ce729296e93870cab0e40248a9d75d05e1d60c /arch/arm64/include/asm/assembler.h | |
parent | arm64: entry.S: Remove disable_dbg (diff) | |
download | linux-b55a5a1b0a7d4f51b6c8eec0d4d78ace8f5fa2b3.tar.xz linux-b55a5a1b0a7d4f51b6c8eec0d4d78ace8f5fa2b3.zip |
arm64: entry.S: convert el1_sync
el1_sync unmasks exceptions on a case-by-case basis, debug exceptions
are unmasked, unless this was a debug exception. IRQs are unmasked
for instruction and data aborts only if the interupted context had
irqs unmasked.
Following our 'dai' order, el1_dbg should run with everything masked.
For the other cases we can inherit whatever we interrupted.
Add a macro inherit_daif to set daif based on the interrupted pstate.
Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Julien Thierry <julien.thierry@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/assembler.h')
-rw-r--r-- | arch/arm64/include/asm/assembler.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h index 8bc63fc98752..1886b8b44672 100644 --- a/arch/arm64/include/asm/assembler.h +++ b/arch/arm64/include/asm/assembler.h @@ -49,6 +49,12 @@ msr daif, \flags .endm + /* Only on aarch64 pstate, PSR_D_BIT is different for aarch32 */ + .macro inherit_daif, pstate:req, tmp:req + and \tmp, \pstate, #(PSR_D_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT) + msr daif, \tmp + .endm + /* * Enable and disable interrupts. */ |