Skip to content

Commit 563cada

Browse files
murzinvwildea01
authored andcommitted
arm64: kernel: do not need to reset UAO on exception entry
Commit e19a6ee ("arm64: kernel: Save and restore UAO and addr_limit on exception entry") states that exception handler inherits the original PSTATE.UAO value, so UAO needes to be reset explicitly. However, ARM 8.2 Extension documentation says: PSTATE.UAO is copied to SPSR_ELx.UAO and is then set to 0 on an exception taken from AArch64 to AArch64 so hardware already does the right thing. Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Acked-by: James Morse <james.morse@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent e937dd5 commit 563cada

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kernel/entry.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
str x20, [sp, #S_ORIG_ADDR_LIMIT]
105105
mov x20, #TASK_SIZE_64
106106
str x20, [tsk, #TI_ADDR_LIMIT]
107-
ALTERNATIVE(nop, SET_PSTATE_UAO(0), ARM64_HAS_UAO, CONFIG_ARM64_UAO)
107+
/* No need to reset PSTATE.UAO, hardware's already set it to 0 for us */
108108
.endif /* \el == 0 */
109109
mrs x22, elr_el1
110110
mrs x23, spsr_el1

0 commit comments

Comments
 (0)