]> git.karo-electronics.de Git - linux-beck.git/commitdiff
arm64: kernel: do not need to reset UAO on exception entry
authorVladimir Murzin <vladimir.murzin@arm.com>
Thu, 1 Sep 2016 13:35:59 +0000 (14:35 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 1 Sep 2016 19:22:47 +0000 (20:22 +0100)
Commit e19a6ee2460b ("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>
arch/arm64/kernel/entry.S

index 6a64182822e5acfae98fd5dcf8a23092884ef229..6880dcc3b465a01f7cb578fbafec6d6f29479521 100644 (file)
        str     x20, [sp, #S_ORIG_ADDR_LIMIT]
        mov     x20, #TASK_SIZE_64
        str     x20, [tsk, #TI_ADDR_LIMIT]
-       ALTERNATIVE(nop, SET_PSTATE_UAO(0), ARM64_HAS_UAO, CONFIG_ARM64_UAO)
+       /* No need to reset PSTATE.UAO, hardware's already set it to 0 for us */
        .endif /* \el == 0 */
        mrs     x22, elr_el1
        mrs     x23, spsr_el1